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.
- odoo/addons/l10n_br_fiscal/README.rst +1 -1
- odoo/addons/l10n_br_fiscal/__manifest__.py +2 -2
- odoo/addons/l10n_br_fiscal/constants/fiscal.py +46 -18
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.document.type.csv +1 -0
- odoo/addons/l10n_br_fiscal/data/operation_data.xml +1 -1
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_demo.xml +3 -179
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_nfse_demo.xml +0 -4
- odoo/addons/l10n_br_fiscal/demo/fiscal_operation_demo.xml +2 -2
- odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +142 -36
- odoo/addons/l10n_br_fiscal/i18n/pt_BR.po +190 -58
- odoo/addons/l10n_br_fiscal/migrations/18.0.3.0.0/pre-migration.py +30 -0
- odoo/addons/l10n_br_fiscal/models/comment.py +3 -1
- odoo/addons/l10n_br_fiscal/models/document.py +27 -8
- odoo/addons/l10n_br_fiscal/models/document_line.py +51 -8
- odoo/addons/l10n_br_fiscal/models/document_line_mixin.py +118 -31
- odoo/addons/l10n_br_fiscal/models/document_line_mixin_methods.py +263 -282
- odoo/addons/l10n_br_fiscal/models/document_mixin.py +8 -5
- odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py +49 -151
- odoo/addons/l10n_br_fiscal/models/document_related.py +1 -1
- odoo/addons/l10n_br_fiscal/models/document_serie.py +33 -0
- odoo/addons/l10n_br_fiscal/models/icms_regulation.py +1 -1
- odoo/addons/l10n_br_fiscal/models/operation_dashboard.py +3 -2
- odoo/addons/l10n_br_fiscal/models/partner_profile.py +6 -0
- odoo/addons/l10n_br_fiscal/models/res_partner.py +7 -0
- odoo/addons/l10n_br_fiscal/models/tax.py +7 -3
- odoo/addons/l10n_br_fiscal/security/fiscal_security.xml +6 -16
- odoo/addons/l10n_br_fiscal/security/ir.model.access.csv +0 -1
- odoo/addons/l10n_br_fiscal/static/description/index.html +1 -1
- odoo/addons/l10n_br_fiscal/tests/__init__.py +1 -0
- odoo/addons/l10n_br_fiscal/tests/test_document_edition.py +175 -10
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_generic.py +13 -42
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_nfse.py +0 -5
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_serie.py +60 -0
- odoo/addons/l10n_br_fiscal/tests/test_tax_benefit.py +2 -5
- odoo/addons/l10n_br_fiscal/views/document_line_mixin_view.xml +1 -0
- odoo/addons/l10n_br_fiscal/views/document_line_view.xml +3 -3
- odoo/addons/l10n_br_fiscal/views/document_view.xml +20 -15
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_menu.xml +0 -9
- odoo/addons/l10n_br_fiscal/views/operation_dashboard_view.xml +3 -3
- odoo/addons/l10n_br_fiscal/views/product_product_view.xml +33 -6
- odoo/addons/l10n_br_fiscal/views/product_template_view.xml +17 -4
- odoo/addons/l10n_br_fiscal/views/res_partner_view.xml +6 -0
- odoo/addons/l10n_br_fiscal/wizards/base_wizard_mixin.py +1 -1
- {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
- {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
- {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
- {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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (C) 2013 Renato Lima - Akretion
|
|
2
2
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
3
|
|
|
4
|
-
from odoo import fields, models
|
|
4
|
+
from odoo import api, fields, models
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class DocumentLine(models.Model):
|
|
@@ -30,7 +30,12 @@ class DocumentLine(models.Model):
|
|
|
30
30
|
ondelete="cascade",
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
name = fields.Char(
|
|
33
|
+
name = fields.Char(
|
|
34
|
+
compute="_compute_name",
|
|
35
|
+
store=True,
|
|
36
|
+
precompute=True,
|
|
37
|
+
readonly=False,
|
|
38
|
+
)
|
|
34
39
|
|
|
35
40
|
company_id = fields.Many2one(
|
|
36
41
|
comodel_name="res.company",
|
|
@@ -45,14 +50,36 @@ class DocumentLine(models.Model):
|
|
|
45
50
|
)
|
|
46
51
|
|
|
47
52
|
partner_id = fields.Many2one(
|
|
48
|
-
|
|
53
|
+
comodel_name="res.partner",
|
|
54
|
+
compute="_compute_partner_id",
|
|
49
55
|
store=True,
|
|
50
56
|
precompute=True,
|
|
57
|
+
readonly=False,
|
|
51
58
|
)
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
# Do not depend on `document_id.partner_id`, the inverse is taking care of that
|
|
61
|
+
def _compute_partner_id(self):
|
|
62
|
+
for line in self:
|
|
63
|
+
line.partner_id = line.document_id.partner_id
|
|
64
|
+
|
|
65
|
+
uom_id = fields.Many2one(
|
|
66
|
+
comodel_name="uom.uom",
|
|
67
|
+
string="UOM",
|
|
68
|
+
compute="_compute_uom_id",
|
|
69
|
+
store=True,
|
|
70
|
+
readonly=False,
|
|
71
|
+
precompute=True,
|
|
72
|
+
)
|
|
54
73
|
|
|
55
|
-
|
|
74
|
+
price_unit = fields.Float(
|
|
75
|
+
digits="Product Price",
|
|
76
|
+
compute="_compute_price_unit_fiscal",
|
|
77
|
+
store=True,
|
|
78
|
+
precompute=True,
|
|
79
|
+
readonly=False,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
quantity = fields.Float(default=1.0)
|
|
56
83
|
|
|
57
84
|
# Usado para tornar Somente Leitura os campos dos custos
|
|
58
85
|
# de entrega quando a definição for por Total
|
|
@@ -70,6 +97,22 @@ class DocumentLine(models.Model):
|
|
|
70
97
|
|
|
71
98
|
additional_data = fields.Text()
|
|
72
99
|
|
|
100
|
+
@api.depends("product_id")
|
|
101
|
+
def _compute_name(self):
|
|
102
|
+
for line in self:
|
|
103
|
+
if line.product_id:
|
|
104
|
+
line.name = line.product_id.display_name
|
|
105
|
+
else:
|
|
106
|
+
line.name = False
|
|
107
|
+
|
|
108
|
+
@api.depends("product_id")
|
|
109
|
+
def _compute_uom_id(self):
|
|
110
|
+
for line in self:
|
|
111
|
+
if line.fiscal_operation_type == "in":
|
|
112
|
+
line.uom_id = line.product_id.uom_po_id
|
|
113
|
+
else:
|
|
114
|
+
line.uom_id = line.product_id.uom_id
|
|
115
|
+
|
|
73
116
|
def __document_comment_vals(self):
|
|
74
117
|
self.ensure_one()
|
|
75
118
|
return {
|
|
@@ -80,7 +123,7 @@ class DocumentLine(models.Model):
|
|
|
80
123
|
}
|
|
81
124
|
|
|
82
125
|
def _document_comment(self):
|
|
83
|
-
for
|
|
84
|
-
|
|
85
|
-
|
|
126
|
+
for line in self:
|
|
127
|
+
line.additional_data = line.comment_ids.compute_message(
|
|
128
|
+
line.__document_comment_vals(), line.manual_additional_data
|
|
86
129
|
)
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
from odoo import api, fields, models
|
|
5
5
|
|
|
6
6
|
from ..constants.fiscal import (
|
|
7
|
+
FINAL_CUSTOMER,
|
|
7
8
|
FISCAL_COMMENT_LINE,
|
|
8
9
|
PRODUCT_FISCAL_TYPE,
|
|
9
10
|
TAX_BASE_TYPE,
|
|
10
|
-
TAX_BASE_TYPE_PERCENT,
|
|
11
11
|
TAX_DOMAIN_COFINS,
|
|
12
12
|
TAX_DOMAIN_COFINS_ST,
|
|
13
13
|
TAX_DOMAIN_COFINS_WH,
|
|
@@ -34,11 +34,8 @@ from ..constants.fiscal import (
|
|
|
34
34
|
)
|
|
35
35
|
from ..constants.icms import (
|
|
36
36
|
ICMS_BASE_TYPE,
|
|
37
|
-
ICMS_BASE_TYPE_DEFAULT,
|
|
38
37
|
ICMS_ORIGIN,
|
|
39
|
-
ICMS_ORIGIN_DEFAULT,
|
|
40
38
|
ICMS_ST_BASE_TYPE,
|
|
41
|
-
ICMS_ST_BASE_TYPE_DEFAULT,
|
|
42
39
|
)
|
|
43
40
|
from ..constants.issqn import (
|
|
44
41
|
ISSQN_ELIGIBILITY,
|
|
@@ -113,7 +110,10 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
113
110
|
tax_icms_or_issqn = fields.Selection(
|
|
114
111
|
selection=TAX_ICMS_OR_ISSQN,
|
|
115
112
|
string="ICMS or ISSQN Tax",
|
|
116
|
-
|
|
113
|
+
compute="_compute_product_fiscal_fields",
|
|
114
|
+
store=True,
|
|
115
|
+
readonly=False,
|
|
116
|
+
precompute=True,
|
|
117
117
|
)
|
|
118
118
|
|
|
119
119
|
partner_is_public_entity = fields.Boolean(related="partner_id.is_public_entity")
|
|
@@ -125,26 +125,58 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
125
125
|
|
|
126
126
|
price_unit = fields.Float(
|
|
127
127
|
digits="Product Price",
|
|
128
|
-
|
|
128
|
+
store=True,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
partner_id = fields.Many2one(comodel_name="res.partner", string="Partner")
|
|
132
|
+
|
|
133
|
+
company_id = fields.Many2one(
|
|
134
|
+
comodel_name="res.company",
|
|
135
|
+
string="Company",
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
ind_final = fields.Selection(
|
|
139
|
+
selection=FINAL_CUSTOMER,
|
|
140
|
+
string="Consumidor final",
|
|
141
|
+
compute="_compute_ind_final",
|
|
129
142
|
store=True,
|
|
130
143
|
precompute=True,
|
|
131
144
|
readonly=False,
|
|
132
145
|
)
|
|
133
146
|
|
|
134
|
-
|
|
147
|
+
def _compute_ind_final(self):
|
|
148
|
+
for line in self:
|
|
149
|
+
doc = line._get_document()
|
|
150
|
+
if line.ind_final != doc.ind_final:
|
|
151
|
+
line.ind_final = doc.ind_final
|
|
135
152
|
|
|
136
153
|
partner_company_type = fields.Selection(related="partner_id.company_type")
|
|
137
154
|
|
|
138
|
-
uom_id = fields.Many2one(
|
|
155
|
+
uom_id = fields.Many2one(
|
|
156
|
+
comodel_name="uom.uom",
|
|
157
|
+
string="UOM",
|
|
158
|
+
)
|
|
139
159
|
|
|
140
160
|
quantity = fields.Float(
|
|
141
161
|
digits="Product Unit of Measure",
|
|
142
162
|
)
|
|
143
163
|
|
|
144
|
-
fiscal_type = fields.Selection(
|
|
164
|
+
fiscal_type = fields.Selection(
|
|
165
|
+
selection=PRODUCT_FISCAL_TYPE,
|
|
166
|
+
compute="_compute_product_fiscal_fields",
|
|
167
|
+
store=True,
|
|
168
|
+
readonly=False,
|
|
169
|
+
precompute=True,
|
|
170
|
+
)
|
|
145
171
|
|
|
146
172
|
ncm_id = fields.Many2one(
|
|
147
|
-
comodel_name="l10n_br_fiscal.ncm",
|
|
173
|
+
comodel_name="l10n_br_fiscal.ncm",
|
|
174
|
+
index=True,
|
|
175
|
+
string="NCM",
|
|
176
|
+
compute="_compute_product_fiscal_fields",
|
|
177
|
+
store=True,
|
|
178
|
+
readonly=False,
|
|
179
|
+
precompute=True,
|
|
148
180
|
)
|
|
149
181
|
|
|
150
182
|
nbm_id = fields.Many2one(
|
|
@@ -152,6 +184,10 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
152
184
|
index=True,
|
|
153
185
|
string="NBM",
|
|
154
186
|
domain="[('ncm_ids', '=', ncm_id)]",
|
|
187
|
+
compute="_compute_product_fiscal_fields",
|
|
188
|
+
store=True,
|
|
189
|
+
readonly=False,
|
|
190
|
+
precompute=True,
|
|
155
191
|
)
|
|
156
192
|
|
|
157
193
|
cest_id = fields.Many2one(
|
|
@@ -159,10 +195,20 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
159
195
|
index=True,
|
|
160
196
|
string="CEST",
|
|
161
197
|
domain="[('ncm_ids', '=', ncm_id)]",
|
|
198
|
+
compute="_compute_product_fiscal_fields",
|
|
199
|
+
store=True,
|
|
200
|
+
readonly=False,
|
|
201
|
+
precompute=True,
|
|
162
202
|
)
|
|
163
203
|
|
|
164
204
|
nbs_id = fields.Many2one(
|
|
165
|
-
comodel_name="l10n_br_fiscal.nbs",
|
|
205
|
+
comodel_name="l10n_br_fiscal.nbs",
|
|
206
|
+
index=True,
|
|
207
|
+
string="NBS",
|
|
208
|
+
compute="_compute_product_fiscal_fields",
|
|
209
|
+
store=True,
|
|
210
|
+
readonly=False,
|
|
211
|
+
precompute=True,
|
|
166
212
|
)
|
|
167
213
|
|
|
168
214
|
fiscal_operation_id = fields.Many2one(
|
|
@@ -184,8 +230,12 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
184
230
|
fiscal_operation_line_id = fields.Many2one(
|
|
185
231
|
comodel_name="l10n_br_fiscal.operation.line",
|
|
186
232
|
string="Operation Line",
|
|
233
|
+
compute="_compute_fiscal_operation_line_id",
|
|
187
234
|
domain="[('fiscal_operation_id', '=', fiscal_operation_id), "
|
|
188
235
|
"('state', '=', 'approved')]",
|
|
236
|
+
store=True,
|
|
237
|
+
precompute=True,
|
|
238
|
+
readonly=False,
|
|
189
239
|
)
|
|
190
240
|
|
|
191
241
|
cfop_id = fields.Many2one(
|
|
@@ -258,11 +308,11 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
258
308
|
compute="_compute_fiscal_amounts",
|
|
259
309
|
)
|
|
260
310
|
|
|
261
|
-
|
|
311
|
+
fiscal_amount_untaxed = fields.Monetary(
|
|
262
312
|
compute="_compute_fiscal_amounts",
|
|
263
313
|
)
|
|
264
314
|
|
|
265
|
-
|
|
315
|
+
fiscal_amount_tax = fields.Monetary(
|
|
266
316
|
compute="_compute_fiscal_amounts",
|
|
267
317
|
)
|
|
268
318
|
|
|
@@ -270,7 +320,7 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
270
320
|
compute="_compute_fiscal_amounts",
|
|
271
321
|
)
|
|
272
322
|
|
|
273
|
-
|
|
323
|
+
fiscal_amount_total = fields.Monetary(
|
|
274
324
|
compute="_compute_fiscal_amounts",
|
|
275
325
|
)
|
|
276
326
|
|
|
@@ -289,14 +339,35 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
289
339
|
compute="_compute_fiscal_amounts",
|
|
290
340
|
)
|
|
291
341
|
|
|
292
|
-
amount_tax_included = fields.Monetary(
|
|
342
|
+
amount_tax_included = fields.Monetary(
|
|
343
|
+
compute="_compute_tax_fields",
|
|
344
|
+
store=True,
|
|
345
|
+
precompute=True,
|
|
346
|
+
readonly=False,
|
|
347
|
+
)
|
|
293
348
|
|
|
294
|
-
amount_tax_not_included = fields.Monetary(
|
|
349
|
+
amount_tax_not_included = fields.Monetary(
|
|
350
|
+
compute="_compute_tax_fields",
|
|
351
|
+
store=True,
|
|
352
|
+
precompute=True,
|
|
353
|
+
readonly=False,
|
|
354
|
+
)
|
|
295
355
|
|
|
296
|
-
amount_tax_withholding = fields.Monetary(
|
|
356
|
+
amount_tax_withholding = fields.Monetary(
|
|
357
|
+
string="Tax Withholding",
|
|
358
|
+
compute="_compute_tax_fields",
|
|
359
|
+
store=True,
|
|
360
|
+
precompute=True,
|
|
361
|
+
readonly=False,
|
|
362
|
+
)
|
|
297
363
|
|
|
298
364
|
fiscal_genre_id = fields.Many2one(
|
|
299
|
-
comodel_name="l10n_br_fiscal.product.genre",
|
|
365
|
+
comodel_name="l10n_br_fiscal.product.genre",
|
|
366
|
+
string="Fiscal Product Genre",
|
|
367
|
+
compute="_compute_product_fiscal_fields",
|
|
368
|
+
store=True,
|
|
369
|
+
readonly=False,
|
|
370
|
+
precompute=True,
|
|
300
371
|
)
|
|
301
372
|
|
|
302
373
|
fiscal_genre_code = fields.Char(
|
|
@@ -307,10 +378,18 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
307
378
|
comodel_name="l10n_br_fiscal.service.type",
|
|
308
379
|
string="Service Type LC 166",
|
|
309
380
|
domain="[('internal_type', '=', 'normal')]",
|
|
381
|
+
compute="_compute_product_fiscal_fields",
|
|
382
|
+
store=True,
|
|
383
|
+
readonly=False,
|
|
384
|
+
precompute=True,
|
|
310
385
|
)
|
|
311
386
|
|
|
312
387
|
city_taxation_code_id = fields.Many2one(
|
|
313
|
-
comodel_name="l10n_br_fiscal.city.taxation.code",
|
|
388
|
+
comodel_name="l10n_br_fiscal.city.taxation.code",
|
|
389
|
+
compute="_compute_city_taxation_code_id",
|
|
390
|
+
store=True,
|
|
391
|
+
readonly=False,
|
|
392
|
+
precompute=True,
|
|
314
393
|
)
|
|
315
394
|
|
|
316
395
|
partner_order = fields.Char(string="Partner Order (xPed)", size=15)
|
|
@@ -330,7 +409,10 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
330
409
|
|
|
331
410
|
issqn_fg_city_id = fields.Many2one(
|
|
332
411
|
comodel_name="res.city",
|
|
412
|
+
related="city_taxation_code_id.city_id",
|
|
333
413
|
string="ISSQN City",
|
|
414
|
+
store=True,
|
|
415
|
+
precompute=True,
|
|
334
416
|
)
|
|
335
417
|
|
|
336
418
|
# vDeducao
|
|
@@ -479,7 +561,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
479
561
|
icms_base_type = fields.Selection(
|
|
480
562
|
selection=ICMS_BASE_TYPE,
|
|
481
563
|
string="ICMS Base Type",
|
|
482
|
-
default=ICMS_BASE_TYPE_DEFAULT,
|
|
483
564
|
compute="_compute_tax_fields",
|
|
484
565
|
store=True,
|
|
485
566
|
precompute=True,
|
|
@@ -487,7 +568,12 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
487
568
|
)
|
|
488
569
|
|
|
489
570
|
icms_origin = fields.Selection(
|
|
490
|
-
selection=ICMS_ORIGIN,
|
|
571
|
+
selection=ICMS_ORIGIN,
|
|
572
|
+
string="ICMS Origin",
|
|
573
|
+
compute="_compute_product_fiscal_fields",
|
|
574
|
+
store=True,
|
|
575
|
+
readonly=False,
|
|
576
|
+
precompute=True,
|
|
491
577
|
)
|
|
492
578
|
|
|
493
579
|
# vBC - Valor da base de cálculo do ICMS
|
|
@@ -561,7 +647,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
561
647
|
icmsst_base_type = fields.Selection(
|
|
562
648
|
selection=ICMS_ST_BASE_TYPE,
|
|
563
649
|
string="ICMS ST Base Type",
|
|
564
|
-
default=ICMS_ST_BASE_TYPE_DEFAULT,
|
|
565
650
|
compute="_compute_tax_fields",
|
|
566
651
|
store=True,
|
|
567
652
|
precompute=True,
|
|
@@ -857,7 +942,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
857
942
|
ipi_base_type = fields.Selection(
|
|
858
943
|
selection=TAX_BASE_TYPE,
|
|
859
944
|
string="IPI Base Type",
|
|
860
|
-
default=TAX_BASE_TYPE_PERCENT,
|
|
861
945
|
compute="_compute_tax_fields",
|
|
862
946
|
store=True,
|
|
863
947
|
precompute=True,
|
|
@@ -981,7 +1065,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
981
1065
|
cofins_base_type = fields.Selection(
|
|
982
1066
|
selection=TAX_BASE_TYPE,
|
|
983
1067
|
string="COFINS Base Type",
|
|
984
|
-
default=TAX_BASE_TYPE_PERCENT,
|
|
985
1068
|
compute="_compute_tax_fields",
|
|
986
1069
|
store=True,
|
|
987
1070
|
precompute=True,
|
|
@@ -1058,7 +1141,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
1058
1141
|
cofinsst_base_type = fields.Selection(
|
|
1059
1142
|
selection=TAX_BASE_TYPE,
|
|
1060
1143
|
string="COFINS ST Base Type",
|
|
1061
|
-
default=TAX_BASE_TYPE_PERCENT,
|
|
1062
1144
|
compute="_compute_tax_fields",
|
|
1063
1145
|
store=True,
|
|
1064
1146
|
precompute=True,
|
|
@@ -1110,7 +1192,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
1110
1192
|
cofins_wh_base_type = fields.Selection(
|
|
1111
1193
|
selection=TAX_BASE_TYPE,
|
|
1112
1194
|
string="COFINS WH Base Type",
|
|
1113
|
-
default=TAX_BASE_TYPE_PERCENT,
|
|
1114
1195
|
compute="_compute_tax_fields",
|
|
1115
1196
|
store=True,
|
|
1116
1197
|
precompute=True,
|
|
@@ -1179,7 +1260,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
1179
1260
|
pis_base_type = fields.Selection(
|
|
1180
1261
|
selection=TAX_BASE_TYPE,
|
|
1181
1262
|
string="PIS Base Type",
|
|
1182
|
-
default=TAX_BASE_TYPE_PERCENT,
|
|
1183
1263
|
compute="_compute_tax_fields",
|
|
1184
1264
|
store=True,
|
|
1185
1265
|
precompute=True,
|
|
@@ -1256,7 +1336,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
1256
1336
|
pisst_base_type = fields.Selection(
|
|
1257
1337
|
selection=TAX_BASE_TYPE,
|
|
1258
1338
|
string="PIS ST Base Type",
|
|
1259
|
-
default=TAX_BASE_TYPE_PERCENT,
|
|
1260
1339
|
compute="_compute_tax_fields",
|
|
1261
1340
|
store=True,
|
|
1262
1341
|
precompute=True,
|
|
@@ -1308,7 +1387,6 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
1308
1387
|
pis_wh_base_type = fields.Selection(
|
|
1309
1388
|
selection=TAX_BASE_TYPE,
|
|
1310
1389
|
string="PIS WH Base Type",
|
|
1311
|
-
default=TAX_BASE_TYPE_PERCENT,
|
|
1312
1390
|
compute="_compute_tax_fields",
|
|
1313
1391
|
store=True,
|
|
1314
1392
|
precompute=True,
|
|
@@ -1620,7 +1698,7 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
1620
1698
|
comodel_name="l10n_br_fiscal.comment",
|
|
1621
1699
|
string="Comments",
|
|
1622
1700
|
domain=[("object", "=", FISCAL_COMMENT_LINE)],
|
|
1623
|
-
compute="
|
|
1701
|
+
compute="_compute_comment_ids",
|
|
1624
1702
|
store=True,
|
|
1625
1703
|
precompute=True,
|
|
1626
1704
|
readonly=False,
|
|
@@ -1630,11 +1708,20 @@ class FiscalDocumentLineMixin(models.AbstractModel):
|
|
|
1630
1708
|
help="Additional data manually entered by user"
|
|
1631
1709
|
)
|
|
1632
1710
|
|
|
1633
|
-
estimate_tax = fields.Monetary(
|
|
1711
|
+
estimate_tax = fields.Monetary(
|
|
1712
|
+
compute="_compute_tax_fields",
|
|
1713
|
+
store=True,
|
|
1714
|
+
precompute=True,
|
|
1715
|
+
readonly=False,
|
|
1716
|
+
)
|
|
1634
1717
|
|
|
1635
1718
|
cnae_id = fields.Many2one(
|
|
1719
|
+
related="city_taxation_code_id.cnae_id",
|
|
1636
1720
|
comodel_name="l10n_br_fiscal.cnae",
|
|
1637
1721
|
string="CNAE Code",
|
|
1722
|
+
store=True,
|
|
1723
|
+
precompute=True,
|
|
1724
|
+
readonly=False,
|
|
1638
1725
|
)
|
|
1639
1726
|
|
|
1640
1727
|
@api.depends("company_id")
|