odoo-addon-l10n-br-fiscal 18.0.2.0.0.10__py3-none-any.whl → 18.0.5.0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of odoo-addon-l10n-br-fiscal might be problematic. Click here for more details.

Files changed (47) hide show
  1. odoo/addons/l10n_br_fiscal/README.rst +1 -1
  2. odoo/addons/l10n_br_fiscal/__manifest__.py +2 -2
  3. odoo/addons/l10n_br_fiscal/constants/fiscal.py +46 -18
  4. odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.document.type.csv +1 -0
  5. odoo/addons/l10n_br_fiscal/data/operation_data.xml +1 -1
  6. odoo/addons/l10n_br_fiscal/demo/fiscal_document_demo.xml +3 -179
  7. odoo/addons/l10n_br_fiscal/demo/fiscal_document_nfse_demo.xml +0 -4
  8. odoo/addons/l10n_br_fiscal/demo/fiscal_operation_demo.xml +2 -2
  9. odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +142 -36
  10. odoo/addons/l10n_br_fiscal/i18n/pt_BR.po +190 -58
  11. odoo/addons/l10n_br_fiscal/migrations/18.0.3.0.0/pre-migration.py +30 -0
  12. odoo/addons/l10n_br_fiscal/models/comment.py +3 -1
  13. odoo/addons/l10n_br_fiscal/models/document.py +27 -8
  14. odoo/addons/l10n_br_fiscal/models/document_line.py +51 -8
  15. odoo/addons/l10n_br_fiscal/models/document_line_mixin.py +118 -31
  16. odoo/addons/l10n_br_fiscal/models/document_line_mixin_methods.py +263 -282
  17. odoo/addons/l10n_br_fiscal/models/document_mixin.py +8 -5
  18. odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py +49 -151
  19. odoo/addons/l10n_br_fiscal/models/document_related.py +1 -1
  20. odoo/addons/l10n_br_fiscal/models/document_serie.py +33 -0
  21. odoo/addons/l10n_br_fiscal/models/icms_regulation.py +1 -1
  22. odoo/addons/l10n_br_fiscal/models/operation_dashboard.py +3 -2
  23. odoo/addons/l10n_br_fiscal/models/partner_profile.py +6 -0
  24. odoo/addons/l10n_br_fiscal/models/res_partner.py +7 -0
  25. odoo/addons/l10n_br_fiscal/models/tax.py +7 -3
  26. odoo/addons/l10n_br_fiscal/security/fiscal_security.xml +6 -16
  27. odoo/addons/l10n_br_fiscal/security/ir.model.access.csv +0 -1
  28. odoo/addons/l10n_br_fiscal/static/description/index.html +1 -1
  29. odoo/addons/l10n_br_fiscal/tests/__init__.py +1 -0
  30. odoo/addons/l10n_br_fiscal/tests/test_document_edition.py +175 -10
  31. odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_generic.py +13 -42
  32. odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_nfse.py +0 -5
  33. odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_serie.py +60 -0
  34. odoo/addons/l10n_br_fiscal/tests/test_tax_benefit.py +2 -5
  35. odoo/addons/l10n_br_fiscal/views/document_line_mixin_view.xml +1 -0
  36. odoo/addons/l10n_br_fiscal/views/document_line_view.xml +3 -3
  37. odoo/addons/l10n_br_fiscal/views/document_view.xml +20 -15
  38. odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_menu.xml +0 -9
  39. odoo/addons/l10n_br_fiscal/views/operation_dashboard_view.xml +3 -3
  40. odoo/addons/l10n_br_fiscal/views/product_product_view.xml +33 -6
  41. odoo/addons/l10n_br_fiscal/views/product_template_view.xml +17 -4
  42. odoo/addons/l10n_br_fiscal/views/res_partner_view.xml +6 -0
  43. odoo/addons/l10n_br_fiscal/wizards/base_wizard_mixin.py +1 -1
  44. {odoo_addon_l10n_br_fiscal-18.0.2.0.0.10.dist-info → odoo_addon_l10n_br_fiscal-18.0.5.0.0.1.dist-info}/METADATA +3 -3
  45. {odoo_addon_l10n_br_fiscal-18.0.2.0.0.10.dist-info → odoo_addon_l10n_br_fiscal-18.0.5.0.0.1.dist-info}/RECORD +47 -45
  46. {odoo_addon_l10n_br_fiscal-18.0.2.0.0.10.dist-info → odoo_addon_l10n_br_fiscal-18.0.5.0.0.1.dist-info}/WHEEL +0 -0
  47. {odoo_addon_l10n_br_fiscal-18.0.2.0.0.10.dist-info → odoo_addon_l10n_br_fiscal-18.0.5.0.0.1.dist-info}/top_level.txt +0 -0
@@ -8,7 +8,6 @@ from ..constants.fiscal import (
8
8
  DOCUMENT_ISSUER,
9
9
  DOCUMENT_ISSUER_COMPANY,
10
10
  FINAL_CUSTOMER,
11
- FINAL_CUSTOMER_YES,
12
11
  FISCAL_COMMENT_DOCUMENT,
13
12
  NFE_IND_PRES,
14
13
  NFE_IND_PRES_DEFAULT,
@@ -111,7 +110,11 @@ class FiscalDocumentMixin(models.AbstractModel):
111
110
  ind_final = fields.Selection(
112
111
  selection=FINAL_CUSTOMER,
113
112
  string="Final Consumption Operation",
114
- default=FINAL_CUSTOMER_YES,
113
+ compute="_compute_ind_final",
114
+ inverse="_inverse_ind_final",
115
+ store=True,
116
+ precompute=True,
117
+ readonly=False,
115
118
  )
116
119
 
117
120
  currency_id = fields.Many2one(
@@ -126,7 +129,7 @@ class FiscalDocumentMixin(models.AbstractModel):
126
129
  help="Amount without discount.",
127
130
  )
128
131
 
129
- amount_untaxed = fields.Monetary(
132
+ fiscal_amount_untaxed = fields.Monetary(
130
133
  compute="_compute_fiscal_amount",
131
134
  store=True,
132
135
  )
@@ -394,12 +397,12 @@ class FiscalDocumentMixin(models.AbstractModel):
394
397
  store=True,
395
398
  )
396
399
 
397
- amount_tax = fields.Monetary(
400
+ fiscal_amount_tax = fields.Monetary(
398
401
  compute="_compute_fiscal_amount",
399
402
  store=True,
400
403
  )
401
404
 
402
- amount_total = fields.Monetary(
405
+ fiscal_amount_total = fields.Monetary(
403
406
  compute="_compute_fiscal_amount",
404
407
  store=True,
405
408
  )
@@ -73,7 +73,8 @@ class FiscalDocumentMixinMethods(models.AbstractModel):
73
73
  def _get_amount_fields(self):
74
74
  """Get all fields with 'amount_' prefix"""
75
75
  fields = self.env["l10n_br_fiscal.document.mixin"]._fields.keys()
76
- amount_fields = [f for f in fields if f.startswith("amount_")]
76
+ prefixes = ("amount_", "fiscal_amount_")
77
+ amount_fields = [f for f in fields if f.startswith(prefixes)]
77
78
  return amount_fields
78
79
 
79
80
  @api.depends("document_serie_id", "issuer")
@@ -87,7 +88,11 @@ class FiscalDocumentMixinMethods(models.AbstractModel):
87
88
  @api.depends("document_type_id", "issuer")
88
89
  def _compute_document_serie_id(self):
89
90
  for doc in self:
90
- if doc.document_type_id and doc.issuer == DOCUMENT_ISSUER_COMPANY:
91
+ if (
92
+ not doc.document_serie_id
93
+ and doc.document_type_id
94
+ and doc.issuer == DOCUMENT_ISSUER_COMPANY
95
+ ):
91
96
  doc.document_serie_id = doc.document_type_id.get_document_serie(
92
97
  doc.company_id, doc.fiscal_operation_id
93
98
  )
@@ -173,14 +178,22 @@ class FiscalDocumentMixinMethods(models.AbstractModel):
173
178
  self.ensure_one()
174
179
  return self.partner_id
175
180
 
176
- @api.onchange("partner_id")
177
- def _onchange_partner_id_fiscal(self):
178
- partner = self._get_fiscal_partner()
179
- if partner:
180
- self.ind_final = partner.ind_final
181
- for line in self._get_amount_lines():
182
- # reload fiscal data, operation line, cfop, taxes, etc.
183
- line._onchange_fiscal_operation_id()
181
+ @api.depends("partner_id")
182
+ def _compute_ind_final(self):
183
+ for doc in self:
184
+ partner = doc._get_fiscal_partner()
185
+ if partner:
186
+ doc.ind_final = partner.ind_final
187
+ else:
188
+ # Default Value
189
+ doc.ind_final = "1" # Yes
190
+
191
+ @api.onchange("ind_final")
192
+ def _inverse_ind_final(self):
193
+ for doc in self:
194
+ for line in doc._get_amount_lines():
195
+ if line.ind_final != doc.ind_final:
196
+ line.ind_final = doc.ind_final
184
197
 
185
198
  @api.depends("fiscal_operation_id")
186
199
  def _compute_operation_name(self):
@@ -198,152 +211,37 @@ class FiscalDocumentMixinMethods(models.AbstractModel):
198
211
  elif doc.comment_ids is None:
199
212
  doc.comment_ids = []
200
213
 
201
- def _inverse_amount_freight(self):
202
- for record in self.filtered(lambda doc: doc._get_product_amount_lines()):
203
- if (
214
+ def _distribute_amount_to_lines(self, amount_field_name, line_field_name):
215
+ for record in self:
216
+ if not (
204
217
  record.delivery_costs == "total"
205
218
  or record.force_compute_delivery_costs_by_total
206
219
  ):
207
- amount_freight_value = record.amount_freight_value
208
- if all(record._get_product_amount_lines().mapped("freight_value")):
209
- amount_freight_old = sum(
210
- record._get_product_amount_lines().mapped("freight_value")
211
- )
212
- for line in record._get_product_amount_lines()[:-1]:
213
- line.freight_value = amount_freight_value * (
214
- line.freight_value / amount_freight_old
215
- )
216
- record._get_product_amount_lines()[-1].freight_value = (
217
- amount_freight_value
218
- - sum(
219
- line.freight_value
220
- for line in record._get_product_amount_lines()[:-1]
221
- )
220
+ continue
221
+ lines = record._get_product_amount_lines()
222
+ if not lines:
223
+ continue
224
+ amount_to_distribute = record[amount_field_name]
225
+ total_gross = sum(lines.mapped("price_gross"))
226
+ if total_gross > 0:
227
+ distributed_amount = 0
228
+ for line in lines[:-1]:
229
+ proportional_amount = record.currency_id.round(
230
+ amount_to_distribute * (line.price_gross / total_gross)
222
231
  )
223
- else:
224
- amount_total = sum(
225
- record._get_product_amount_lines().mapped("price_gross")
226
- )
227
- for line in record._get_product_amount_lines()[:-1]:
228
- if line.price_gross and amount_total:
229
- line.freight_value = amount_freight_value * (
230
- line.price_gross / amount_total
231
- )
232
- record._get_product_amount_lines()[-1].freight_value = (
233
- amount_freight_value
234
- - sum(
235
- line.freight_value
236
- for line in record._get_product_amount_lines()[:-1]
237
- )
238
- )
239
- for line in record._get_product_amount_lines():
240
- line._onchange_fiscal_taxes()
241
- record._fields["amount_total"].compute_value(record)
242
- record.write(
243
- {
244
- name: value
245
- for name, value in record._cache.items()
246
- if record._fields[name].compute == "_amount_all"
247
- and not record._fields[name].inverse
248
- }
249
- )
232
+ line[line_field_name] = proportional_amount
233
+ distributed_amount += proportional_amount
234
+ lines[-1][line_field_name] = amount_to_distribute - distributed_amount
235
+ else:
236
+ lines.write({line_field_name: 0.0})
237
+ if lines:
238
+ lines[0][line_field_name] = amount_to_distribute
239
+
240
+ def _inverse_amount_freight(self):
241
+ self._distribute_amount_to_lines("amount_freight_value", "freight_value")
250
242
 
251
243
  def _inverse_amount_insurance(self):
252
- for record in self.filtered(lambda doc: doc._get_product_amount_lines()):
253
- if (
254
- record.delivery_costs == "total"
255
- or record.force_compute_delivery_costs_by_total
256
- ):
257
- amount_insurance_value = record.amount_insurance_value
258
- if all(record._get_product_amount_lines().mapped("insurance_value")):
259
- amount_insurance_old = sum(
260
- record._get_product_amount_lines().mapped("insurance_value")
261
- )
262
- for line in record._get_product_amount_lines()[:-1]:
263
- line.insurance_value = amount_insurance_value * (
264
- line.insurance_value / amount_insurance_old
265
- )
266
- record._get_product_amount_lines()[-1].insurance_value = (
267
- amount_insurance_value
268
- - sum(
269
- line.insurance_value
270
- for line in record._get_product_amount_lines()[:-1]
271
- )
272
- )
273
- else:
274
- amount_total = sum(
275
- record._get_product_amount_lines().mapped("price_gross")
276
- )
277
- for line in record._get_product_amount_lines()[:-1]:
278
- if line.price_gross and amount_total:
279
- line.insurance_value = amount_insurance_value * (
280
- line.price_gross / amount_total
281
- )
282
- record._get_product_amount_lines()[-1].insurance_value = (
283
- amount_insurance_value
284
- - sum(
285
- line.insurance_value
286
- for line in record._get_product_amount_lines()[:-1]
287
- )
288
- )
289
- for line in record._get_product_amount_lines():
290
- line._onchange_fiscal_taxes()
291
- record._fields["amount_total"].compute_value(record)
292
- record.write(
293
- {
294
- name: value
295
- for name, value in record._cache.items()
296
- if record._fields[name].compute == "_amount_all"
297
- and not record._fields[name].inverse
298
- }
299
- )
244
+ self._distribute_amount_to_lines("amount_insurance_value", "insurance_value")
300
245
 
301
246
  def _inverse_amount_other(self):
302
- for record in self.filtered(lambda doc: doc._get_product_amount_lines()):
303
- if (
304
- record.delivery_costs == "total"
305
- or record.force_compute_delivery_costs_by_total
306
- ):
307
- amount_other_value = record.amount_other_value
308
- if all(record._get_product_amount_lines().mapped("other_value")):
309
- amount_other_old = sum(
310
- record._get_product_amount_lines().mapped("other_value")
311
- )
312
- for line in record._get_product_amount_lines()[:-1]:
313
- line.other_value = amount_other_value * (
314
- line.other_value / amount_other_old
315
- )
316
- record._get_product_amount_lines()[-1].other_value = (
317
- amount_other_value
318
- - sum(
319
- line.other_value
320
- for line in record._get_product_amount_lines()[:-1]
321
- )
322
- )
323
- else:
324
- amount_total = sum(
325
- record._get_product_amount_lines().mapped("price_gross")
326
- )
327
- for line in record._get_product_amount_lines()[:-1]:
328
- if line.price_gross and amount_total:
329
- line.other_value = amount_other_value * (
330
- line.price_gross / amount_total
331
- )
332
- record._get_product_amount_lines()[-1].other_value = (
333
- amount_other_value
334
- - sum(
335
- line.other_value
336
- for line in record._get_product_amount_lines()[:-1]
337
- )
338
- )
339
- for line in record._get_product_amount_lines():
340
- line._onchange_fiscal_taxes()
341
- record._fields["amount_total"].compute_value(record)
342
- record.write(
343
- {
344
- name: value
345
- for name, value in record._cache.items()
346
- if record._fields[name].compute == "_amount_all"
347
- and not record._fields[name].inverse
348
- }
349
- )
247
+ self._distribute_amount_to_lines("amount_other_value", "other_value")
@@ -104,7 +104,7 @@ class DocumentRelated(models.Model):
104
104
  return False
105
105
 
106
106
  self.document_type_id = related.document_type_id
107
- self.document_total_amount = related.amount_total
107
+ self.document_total_amount = related.fiscal_amount_total
108
108
  self.document_total_weight = related.total_weight
109
109
 
110
110
  if related.document_type_id.electronic:
@@ -3,11 +3,13 @@
3
3
  # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
4
4
 
5
5
  from odoo import _, api, fields, models
6
+ from odoo.exceptions import ValidationError
6
7
 
7
8
  from ..constants.fiscal import (
8
9
  DOCUMENT_ISSUER_COMPANY,
9
10
  FISCAL_IN_OUT,
10
11
  FISCAL_IN_OUT_DEFAULT,
12
+ SITUACAO_EDOC_EM_DIGITACAO,
11
13
  )
12
14
 
13
15
 
@@ -55,6 +57,14 @@ class DocumentSerie(models.Model):
55
57
  string="Invalidate Number Range",
56
58
  )
57
59
 
60
+ _sql_constraints = [
61
+ (
62
+ "document_serie_unique",
63
+ "unique(code, document_type_id, company_id)",
64
+ "A Fiscal Document Serie already exists for this document type.",
65
+ )
66
+ ]
67
+
58
68
  @api.model
59
69
  def _create_sequence(self, values):
60
70
  """Create new no_gap entry sequence for every
@@ -83,6 +93,29 @@ class DocumentSerie(models.Model):
83
93
  for record in self:
84
94
  record.display_name = record.name
85
95
 
96
+ def write(self, vals):
97
+ if "internal_sequence_id" in vals:
98
+ raise ValidationError(_("You cannot change the internal sequence."))
99
+ if "code" in vals:
100
+ for serie in self:
101
+ if serie.code == vals["code"]:
102
+ continue
103
+ if self.env["l10n_br_fiscal.document"].search_count(
104
+ [
105
+ ("document_serie_id", "=", serie.id),
106
+ ("state_edoc", "not in", [SITUACAO_EDOC_EM_DIGITACAO]),
107
+ ],
108
+ limit=1,
109
+ ):
110
+ raise ValidationError(
111
+ _(
112
+ "You cannot change the code of a document "
113
+ "serie %(name)s that is already in use.",
114
+ name=serie.name,
115
+ )
116
+ )
117
+ return super().write(vals)
118
+
86
119
  def _is_invalid_number(self, document_number):
87
120
  self.ensure_one()
88
121
  is_invalid_number = True
@@ -2101,7 +2101,7 @@ class ICMSRegulation(models.Model):
2101
2101
  company.state_id != partner.state_id
2102
2102
  and partner.ind_ie_dest == NFE_IND_IE_DEST_9
2103
2103
  and operation_line.fiscal_operation_type == FISCAL_OUT
2104
- or operation_line.fiscal_operation_id.fiscal_type == "return_in"
2104
+ or operation_line.fiscal_operation_id.fiscal_type != "return_in"
2105
2105
  and operation_line.fiscal_operation_type == FISCAL_IN
2106
2106
  ):
2107
2107
  domain = self._build_map_tax_def_domain(
@@ -127,7 +127,7 @@ class Operation(models.Model):
127
127
  }
128
128
 
129
129
  def open_action(self):
130
- """return action based on type for related journals"""
130
+ """Return action based on type for related journals"""
131
131
 
132
132
  _fiscal_type_map = {
133
133
  "purchase": "in",
@@ -157,7 +157,8 @@ class Operation(models.Model):
157
157
  }
158
158
  )
159
159
 
160
- [action] = self.env.ref("l10n_br_fiscal.{action_name}").read()
160
+ xmlid = f"l10n_br_fiscal.{action_name}"
161
+ [action] = self.env.ref(xmlid).read()
161
162
  action["context"] = ctx
162
163
  action["domain"] = self._context.get("use_domain", [])
163
164
  action["domain"] += [
@@ -8,6 +8,7 @@ from odoo.exceptions import ValidationError
8
8
  from ..constants.fiscal import (
9
9
  NFE_IND_IE_DEST,
10
10
  NFE_IND_IE_DEST_DEFAULT,
11
+ PUBLIC_ENTIRY_TYPE,
11
12
  TAX_FRAMEWORK,
12
13
  TAX_FRAMEWORK_NORMAL,
13
14
  )
@@ -32,6 +33,11 @@ class PartnerProfile(models.Model):
32
33
  "other government-controlled organizations.",
33
34
  )
34
35
 
36
+ public_entity_type = fields.Selection(
37
+ selection=PUBLIC_ENTIRY_TYPE,
38
+ string="Tipo de Entidade Governamental",
39
+ )
40
+
35
41
  default = fields.Boolean(string="Default Profile", default=True)
36
42
 
37
43
  ind_ie_dest = fields.Selection(
@@ -10,6 +10,7 @@ from ..constants.fiscal import (
10
10
  NFE_IND_IE_DEST,
11
11
  NFE_IND_IE_DEST_9,
12
12
  NFE_IND_IE_DEST_DEFAULT,
13
+ PUBLIC_ENTIRY_TYPE,
13
14
  TAX_FRAMEWORK,
14
15
  TAX_FRAMEWORK_NORMAL,
15
16
  )
@@ -76,6 +77,11 @@ class ResPartner(models.Model):
76
77
  "other government-controlled organizations.",
77
78
  )
78
79
 
80
+ public_entity_type = fields.Selection(
81
+ selection=PUBLIC_ENTIRY_TYPE,
82
+ string="Tipo de Entidade Governamental",
83
+ )
84
+
79
85
  ind_final = fields.Selection(
80
86
  selection=FINAL_CUSTOMER,
81
87
  string="Final Consumption Operation",
@@ -125,6 +131,7 @@ class ResPartner(models.Model):
125
131
  p.tax_framework = p.fiscal_profile_id.tax_framework
126
132
  p.ind_ie_dest = p.fiscal_profile_id.ind_ie_dest
127
133
  p.is_public_entity = p.fiscal_profile_id.is_public_entity
134
+ p.public_entity_type = p.fiscal_profile_id.public_entity_type
128
135
 
129
136
  @api.onchange("ind_ie_dest")
130
137
  def _onchange_ind_ie_dest(self):
@@ -454,9 +454,13 @@ class Tax(models.Model):
454
454
  and cfop.destination == CFOP_DESTINATION_EXTERNAL
455
455
  and partner.ind_ie_dest == NFE_IND_IE_DEST_9
456
456
  and tax_dict.get("tax_value")
457
- and operation_line.fiscal_operation_type == FISCAL_OUT
458
- or operation_line.fiscal_operation_id.fiscal_type == "return_in"
459
- and operation_line.fiscal_operation_type == FISCAL_IN
457
+ and (
458
+ operation_line.fiscal_operation_type == FISCAL_OUT
459
+ or (
460
+ operation_line.fiscal_operation_type == FISCAL_IN
461
+ and operation_line.fiscal_operation_id.fiscal_type != "return_in"
462
+ )
463
+ )
460
464
  ):
461
465
  icms_tax_difal, _ = company.icms_regulation_id.map_tax_def_icms_difal(
462
466
  company, partner, product, ncm, nbm, cest, operation_line, ind_final
@@ -38,44 +38,34 @@
38
38
  <field name="name">Fiscal Tax Estimate multi-company</field>
39
39
  <field name="model_id" ref="model_l10n_br_fiscal_tax_estimate" />
40
40
  <field eval="True" name="global" />
41
- <field
42
- name="domain_force"
43
- >['|',('company_id','=',False),('company_id','in',company_ids)]</field>
41
+ <field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
44
42
  </record>
45
43
 
46
- <record id="l10n_br_fiscal_operation_line_rule" model="ir.rule">
44
+ <record id="l10n_br_fiscal_operation_rule" model="ir.rule">
47
45
  <field name="name">Fiscal Operation multi-company</field>
48
46
  <field name="model_id" ref="model_l10n_br_fiscal_operation" />
49
47
  <field eval="True" name="global" />
50
- <field
51
- name="domain_force"
52
- >['|',('company_id','=',False),('company_id','in',company_ids)]</field>
48
+ <field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
53
49
  </record>
54
50
 
55
51
  <record id="l10n_br_fiscal_document_serie_rule" model="ir.rule">
56
52
  <field name="name">Fiscal Document Serie multi-company</field>
57
53
  <field name="model_id" ref="model_l10n_br_fiscal_document_serie" />
58
54
  <field eval="True" name="global" />
59
- <field
60
- name="domain_force"
61
- >['|',('company_id','=',False),('company_id','in',company_ids)]</field>
55
+ <field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
62
56
  </record>
63
57
 
64
58
  <record id="l10n_br_fiscal_document_rule" model="ir.rule">
65
59
  <field name="name">Fiscal Document multi-company</field>
66
60
  <field name="model_id" ref="model_l10n_br_fiscal_document" />
67
61
  <field eval="True" name="global" />
68
- <field
69
- name="domain_force"
70
- >['|',('company_id','=',False),('company_id','in',company_ids)]</field>
62
+ <field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
71
63
  </record>
72
64
 
73
65
  <record id="l10n_br_fiscal_document_line_rule" model="ir.rule">
74
66
  <field name="name">Fiscal Document line multi-company</field>
75
67
  <field name="model_id" ref="model_l10n_br_fiscal_document_line" />
76
68
  <field eval="True" name="global" />
77
- <field
78
- name="domain_force"
79
- >['|',('company_id','=',False),('company_id','in',company_ids)]</field>
69
+ <field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
80
70
  </record>
81
71
  </odoo>
@@ -94,6 +94,5 @@
94
94
  "l10n_br_fiscal_invalidate_number_manager","manager_l10n_br_fiscal_invalidate_number","model_l10n_br_fiscal_invalidate_number","l10n_br_fiscal.group_manager",1,1,1,1
95
95
  "l10n_br_fiscal_city_taxation_code_user","Fiscal City Taxation Code for User","model_l10n_br_fiscal_city_taxation_code","l10n_br_fiscal.group_user",1,1,1,0
96
96
  "l10n_br_fiscal_city_taxation_code_manager","Fiscal City Taxation Code for Manager","model_l10n_br_fiscal_city_taxation_code","l10n_br_fiscal.group_user",1,1,1,1
97
- "l10n_br_fiscal_base_wizard_mixin_user",l10n_br_fiscal_base_wizard_mixin,model_l10n_br_fiscal_base_wizard_mixin,base.group_user,1,1,1,1
98
97
  "l10n_br_fiscal_document_status_wizard_user",l10n_br_fiscal_document_status_wizard,model_l10n_br_fiscal_document_status_wizard,base.group_user,1,1,1,1
99
98
  "l10n_br_fiscal_document_import_wizard_mixin_user",l10n_br_fiscal_document_import_wizard_mixin_user,model_l10n_br_fiscal_document_import_wizard_mixin,base.group_user,1,1,1,1
@@ -372,7 +372,7 @@ ul.auto-toc {
372
372
  !! This file is generated by oca-gen-addon-readme !!
373
373
  !! changes will be overwritten. !!
374
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
- !! source digest: sha256:b7471fd6bd126d628ba34ff9f474314e408b56c0cde25924e2312b4a1c047a5c
375
+ !! source digest: sha256:9b476f778818f11bdbac8619f6f6de8e9fd857792cfb19d7408154b19de9ca0b
376
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
377
  <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-brazil/tree/18.0/l10n_br_fiscal"><img alt="OCA/l10n-brazil" src="https://img.shields.io/badge/github-OCA%2Fl10n--brazil-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-brazil-18-0/l10n-brazil-18-0-l10n_br_fiscal"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-brazil&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
378
  <p><img alt="image" src="https://raw.githubusercontent.com/OCA/l10n-brazil/18.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" /></p>
@@ -2,6 +2,7 @@
2
2
 
3
3
  from . import (
4
4
  test_cnae,
5
+ test_fiscal_document_serie,
5
6
  test_fiscal_document_generic,
6
7
  test_fiscal_document_nfse,
7
8
  test_fiscal_tax,