odoo-addon-l10n-br-fiscal 16.0.19.4.0__py3-none-any.whl → 17.0.4.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.
- odoo/addons/l10n_br_fiscal/README.rst +10 -10
- odoo/addons/l10n_br_fiscal/__init__.py +2 -3
- odoo/addons/l10n_br_fiscal/__manifest__.py +3 -7
- odoo/addons/l10n_br_fiscal/constants/fiscal.py +0 -66
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.cest.csv +983 -1043
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.cst.csv +0 -58
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.tax.csv +0 -31
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.tax.group.csv +0 -3
- odoo/addons/l10n_br_fiscal/data/product_data.xml +2 -2
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_demo.xml +88 -0
- odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +28 -1031
- odoo/addons/l10n_br_fiscal/i18n/pt_BR.po +1078 -1197
- odoo/addons/l10n_br_fiscal/models/__init__.py +2 -2
- odoo/addons/l10n_br_fiscal/models/comment.py +20 -18
- odoo/addons/l10n_br_fiscal/models/data_abstract.py +11 -12
- odoo/addons/l10n_br_fiscal/models/document.py +4 -30
- odoo/addons/l10n_br_fiscal/models/document_line.py +3 -16
- odoo/addons/l10n_br_fiscal/models/document_line_mixin.py +27 -1048
- odoo/addons/l10n_br_fiscal/models/document_line_mixin_methods.py +883 -0
- odoo/addons/l10n_br_fiscal/models/document_mixin.py +3 -241
- odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py +239 -0
- odoo/addons/l10n_br_fiscal/models/document_serie.py +5 -3
- odoo/addons/l10n_br_fiscal/models/invalidate_number.py +0 -6
- odoo/addons/l10n_br_fiscal/models/operation.py +0 -11
- odoo/addons/l10n_br_fiscal/models/operation_dashboard.py +2 -3
- odoo/addons/l10n_br_fiscal/models/operation_line.py +0 -28
- odoo/addons/l10n_br_fiscal/models/partner_profile.py +0 -6
- odoo/addons/l10n_br_fiscal/models/product_template.py +0 -4
- odoo/addons/l10n_br_fiscal/models/res_company.py +0 -18
- odoo/addons/l10n_br_fiscal/models/res_partner.py +0 -17
- odoo/addons/l10n_br_fiscal/models/simplified_tax_range.py +0 -8
- odoo/addons/l10n_br_fiscal/models/tax_definition.py +2 -35
- odoo/addons/l10n_br_fiscal/security/ir.model.access.csv +0 -6
- odoo/addons/l10n_br_fiscal/static/description/index.html +8 -8
- odoo/addons/l10n_br_fiscal/tests/__init__.py +0 -1
- odoo/addons/l10n_br_fiscal/tests/test_cnae.py +2 -3
- odoo/addons/l10n_br_fiscal/tests/test_document_edition.py +10 -37
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_generic.py +28 -4
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_nfse.py +4 -0
- odoo/addons/l10n_br_fiscal/tests/test_service_type.py +2 -3
- odoo/addons/l10n_br_fiscal/tests/test_tax_benefit.py +4 -2
- odoo/addons/l10n_br_fiscal/views/cest_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/cnae_view.xml +0 -1
- odoo/addons/l10n_br_fiscal/views/document_line_mixin_view.xml +170 -243
- odoo/addons/l10n_br_fiscal/views/document_line_view.xml +7 -11
- odoo/addons/l10n_br_fiscal/views/document_related_view.xml +15 -11
- odoo/addons/l10n_br_fiscal/views/document_serie_view.xml +1 -1
- odoo/addons/l10n_br_fiscal/views/document_view.xml +32 -44
- odoo/addons/l10n_br_fiscal/views/invalidate_number_view.xml +12 -12
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_action.xml +0 -31
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_menu.xml +2 -18
- odoo/addons/l10n_br_fiscal/views/nbm_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/nbs_view.xml +1 -1
- odoo/addons/l10n_br_fiscal/views/ncm_view.xml +3 -3
- odoo/addons/l10n_br_fiscal/views/operation_dashboard_view.xml +27 -18
- odoo/addons/l10n_br_fiscal/views/operation_line_view.xml +2 -5
- odoo/addons/l10n_br_fiscal/views/operation_view.xml +39 -16
- odoo/addons/l10n_br_fiscal/views/partner_profile_view.xml +3 -6
- odoo/addons/l10n_br_fiscal/views/product_genre_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/product_product_view.xml +17 -45
- odoo/addons/l10n_br_fiscal/views/product_template_view.xml +16 -35
- odoo/addons/l10n_br_fiscal/views/res_company_view.xml +17 -18
- odoo/addons/l10n_br_fiscal/views/res_config_settings_view.xml +37 -98
- odoo/addons/l10n_br_fiscal/views/res_partner_view.xml +3 -13
- odoo/addons/l10n_br_fiscal/views/service_type_view.xml +2 -3
- odoo/addons/l10n_br_fiscal/views/tax_definition_view.xml +60 -29
- odoo/addons/l10n_br_fiscal/views/tax_estimate_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/tax_group_view.xml +4 -4
- odoo/addons/l10n_br_fiscal/views/tax_view.xml +14 -16
- odoo/addons/l10n_br_fiscal/wizards/document_import_wizard_mixin.py +1 -1
- odoo/addons/l10n_br_fiscal/wizards/document_import_wizard_mixin.xml +2 -5
- {odoo_addon_l10n_br_fiscal-16.0.19.4.0.dist-info → odoo_addon_l10n_br_fiscal-17.0.4.0.0.1.dist-info}/METADATA +16 -16
- {odoo_addon_l10n_br_fiscal-16.0.19.4.0.dist-info → odoo_addon_l10n_br_fiscal-17.0.4.0.0.1.dist-info}/RECORD +77 -88
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.operation.indicator.csv +0 -27
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.tax.classification.csv +0 -163
- odoo/addons/l10n_br_fiscal/migrations/16.0.14.0.5/pre-migration.py +0 -15
- odoo/addons/l10n_br_fiscal/migrations/16.0.2.0.0/pre-migration.py +0 -25
- odoo/addons/l10n_br_fiscal/migrations/16.0.2.15.0/pre-migration.py +0 -19
- odoo/addons/l10n_br_fiscal/migrations/16.0.4.0.0/pre-migration.py +0 -220
- odoo/addons/l10n_br_fiscal/migrations/16.0.5.0.0/pre-migration.py +0 -33
- odoo/addons/l10n_br_fiscal/migrations/16.0.5.2.0/pre-migration.py +0 -21
- odoo/addons/l10n_br_fiscal/models/operation_indicator.py +0 -58
- odoo/addons/l10n_br_fiscal/models/tax_classification.py +0 -81
- odoo/addons/l10n_br_fiscal/tests/test_tax_classification.py +0 -110
- odoo/addons/l10n_br_fiscal/views/operation_indicator_view.xml +0 -75
- odoo/addons/l10n_br_fiscal/views/tax_classification.xml +0 -110
- /odoo/addons/l10n_br_fiscal/migrations/{16.0.13.0.0 → 17.0.2.0.0}/pre-migration.py +0 -0
- /odoo/addons/l10n_br_fiscal/migrations/{16.0.14.0.0 → 17.0.3.0.0}/pre-migration.py +0 -0
- {odoo_addon_l10n_br_fiscal-16.0.19.4.0.dist-info → odoo_addon_l10n_br_fiscal-17.0.4.0.0.1.dist-info}/WHEEL +0 -0
- {odoo_addon_l10n_br_fiscal-16.0.19.4.0.dist-info → odoo_addon_l10n_br_fiscal-17.0.4.0.0.1.dist-info}/top_level.txt +0 -0
|
@@ -37,11 +37,6 @@ class OperationLine(models.Model):
|
|
|
37
37
|
|
|
38
38
|
document_type_id = fields.Many2one(comodel_name="l10n_br_fiscal.document.type")
|
|
39
39
|
|
|
40
|
-
tax_classification_id = fields.Many2one(
|
|
41
|
-
comodel_name="l10n_br_fiscal.tax.classification",
|
|
42
|
-
string="Tax Classification",
|
|
43
|
-
)
|
|
44
|
-
|
|
45
40
|
cfop_internal_id = fields.Many2one(
|
|
46
41
|
comodel_name="l10n_br_fiscal.cfop",
|
|
47
42
|
string="CFOP Internal",
|
|
@@ -172,13 +167,6 @@ class OperationLine(models.Model):
|
|
|
172
167
|
cfop = self.cfop_export_id
|
|
173
168
|
return cfop
|
|
174
169
|
|
|
175
|
-
def _get_tax_classification(self, company):
|
|
176
|
-
if self.tax_classification_id:
|
|
177
|
-
return self.tax_classification_id
|
|
178
|
-
elif company.tax_classification_id:
|
|
179
|
-
return company.tax_classification_id
|
|
180
|
-
return self.env["l10n_br_fiscal.tax.classification"]
|
|
181
|
-
|
|
182
170
|
def _build_mapping_result_ipi(self, mapping_result, tax_definition):
|
|
183
171
|
if tax_definition and tax_definition.ipi_guideline_id:
|
|
184
172
|
mapping_result["ipi_guideline"] = tax_definition.ipi_guideline_id
|
|
@@ -258,15 +246,12 @@ class OperationLine(models.Model):
|
|
|
258
246
|
(l10n_br_fiscal.tax.ipi.guideline).
|
|
259
247
|
- 'icms_tax_benefit_id': The determined ICMS tax benefit record
|
|
260
248
|
ID (l10n_br_fiscal.tax.definition) or False.
|
|
261
|
-
- 'tax_classification': The determined Tax Classification record
|
|
262
|
-
(l10n_br_fiscal.tax.classification).
|
|
263
249
|
"""
|
|
264
250
|
mapping_result = {
|
|
265
251
|
"taxes": {},
|
|
266
252
|
"cfop": False,
|
|
267
253
|
"ipi_guideline": self.env.ref("l10n_br_fiscal.tax_guideline_999"),
|
|
268
254
|
"icms_tax_benefit_id": False,
|
|
269
|
-
"tax_classification": False,
|
|
270
255
|
}
|
|
271
256
|
|
|
272
257
|
self.ensure_one()
|
|
@@ -274,9 +259,6 @@ class OperationLine(models.Model):
|
|
|
274
259
|
# Define CFOP
|
|
275
260
|
mapping_result["cfop"] = self._get_cfop(company, partner)
|
|
276
261
|
|
|
277
|
-
# Define Tax Classification
|
|
278
|
-
mapping_result["tax_classification"] = self._get_tax_classification(company)
|
|
279
|
-
|
|
280
262
|
# 1 Get Tax Defs from Company
|
|
281
263
|
for tax_definition in company.tax_definition_ids.map_tax_definition(
|
|
282
264
|
company,
|
|
@@ -291,16 +273,6 @@ class OperationLine(models.Model):
|
|
|
291
273
|
):
|
|
292
274
|
self._build_mapping_result(mapping_result, tax_definition)
|
|
293
275
|
|
|
294
|
-
# 1_5 From Tax Classification
|
|
295
|
-
if mapping_result["tax_classification"]:
|
|
296
|
-
mapping_result["taxes"][
|
|
297
|
-
mapping_result["tax_classification"].tax_cbs_id.tax_domain
|
|
298
|
-
] = mapping_result["tax_classification"].tax_cbs_id
|
|
299
|
-
|
|
300
|
-
mapping_result["taxes"][
|
|
301
|
-
mapping_result["tax_classification"].tax_ibs_id.tax_domain
|
|
302
|
-
] = mapping_result["tax_classification"].tax_ibs_id
|
|
303
|
-
|
|
304
276
|
# 2 From NCM
|
|
305
277
|
if not ncm and product:
|
|
306
278
|
ncm = product.ncm_id
|
|
@@ -8,7 +8,6 @@ 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,
|
|
12
11
|
TAX_FRAMEWORK,
|
|
13
12
|
TAX_FRAMEWORK_NORMAL,
|
|
14
13
|
)
|
|
@@ -33,11 +32,6 @@ class PartnerProfile(models.Model):
|
|
|
33
32
|
"other government-controlled organizations.",
|
|
34
33
|
)
|
|
35
34
|
|
|
36
|
-
public_entity_type = fields.Selection(
|
|
37
|
-
selection=PUBLIC_ENTIRY_TYPE,
|
|
38
|
-
string="Tipo de Entidade Governamental",
|
|
39
|
-
)
|
|
40
|
-
|
|
41
35
|
default = fields.Boolean(string="Default Profile", default=True)
|
|
42
36
|
|
|
43
37
|
ind_ie_dest = fields.Selection(
|
|
@@ -106,10 +106,6 @@ class ProductTemplate(models.Model):
|
|
|
106
106
|
comodel_name="l10n_br_fiscal.nbs", index=True, string="NBS"
|
|
107
107
|
)
|
|
108
108
|
|
|
109
|
-
operation_indicator_id = fields.Many2one(
|
|
110
|
-
comodel_name="l10n_br_fiscal.operation.indicator",
|
|
111
|
-
)
|
|
112
|
-
|
|
113
109
|
cest_id = fields.Many2one(
|
|
114
110
|
comodel_name="l10n_br_fiscal.cest",
|
|
115
111
|
index=True,
|
|
@@ -14,12 +14,10 @@ from ..constants.fiscal import (
|
|
|
14
14
|
PROCESSADOR_NENHUM,
|
|
15
15
|
PROFIT_CALCULATION,
|
|
16
16
|
PROFIT_CALCULATION_PRESUMED,
|
|
17
|
-
TAX_DOMAIN_CBS,
|
|
18
17
|
TAX_DOMAIN_COFINS,
|
|
19
18
|
TAX_DOMAIN_COFINS_WH,
|
|
20
19
|
TAX_DOMAIN_CSLL,
|
|
21
20
|
TAX_DOMAIN_CSLL_WH,
|
|
22
|
-
TAX_DOMAIN_IBS,
|
|
23
21
|
TAX_DOMAIN_ICMS,
|
|
24
22
|
TAX_DOMAIN_ICMS_SN,
|
|
25
23
|
TAX_DOMAIN_INSS,
|
|
@@ -299,12 +297,6 @@ class ResCompany(models.Model):
|
|
|
299
297
|
domain=[("tax_domain", "=", TAX_DOMAIN_INSS_WH)],
|
|
300
298
|
)
|
|
301
299
|
|
|
302
|
-
tax_classification_id = fields.Many2one(
|
|
303
|
-
comodel_name="l10n_br_fiscal.tax.classification",
|
|
304
|
-
string="Default Tax Classification",
|
|
305
|
-
domain=[("tax_ibs_id", "!=", False), ("tax_cbs_id", "!=", False)],
|
|
306
|
-
)
|
|
307
|
-
|
|
308
300
|
tax_definition_ids = fields.One2many(
|
|
309
301
|
comodel_name="l10n_br_fiscal.tax.definition",
|
|
310
302
|
inverse_name="company_id",
|
|
@@ -385,7 +377,6 @@ class ResCompany(models.Model):
|
|
|
385
377
|
self.tax_icms_id = False
|
|
386
378
|
|
|
387
379
|
self._onchange_piscofins_id()
|
|
388
|
-
self._onchange_tax_classification_id()
|
|
389
380
|
self._onchange_ripi()
|
|
390
381
|
self._onchange_tax_ipi_id()
|
|
391
382
|
self._onchange_tax_icms_id()
|
|
@@ -511,12 +502,3 @@ class ResCompany(models.Model):
|
|
|
511
502
|
self._set_tax_definition(self.tax_inss_wh_id)
|
|
512
503
|
else:
|
|
513
504
|
self._del_tax_definition(TAX_DOMAIN_INSS_WH)
|
|
514
|
-
|
|
515
|
-
@api.onchange("tax_classification_id")
|
|
516
|
-
def _onchange_tax_classification_id(self):
|
|
517
|
-
if self.tax_classification_id:
|
|
518
|
-
self._set_tax_definition(self.tax_classification_id.tax_cbs_id)
|
|
519
|
-
self._set_tax_definition(self.tax_classification_id.tax_ibs_id)
|
|
520
|
-
else:
|
|
521
|
-
self._del_tax_definition(TAX_DOMAIN_CBS)
|
|
522
|
-
self._del_tax_definition(TAX_DOMAIN_IBS)
|
|
@@ -10,7 +10,6 @@ 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,
|
|
14
13
|
TAX_FRAMEWORK,
|
|
15
14
|
TAX_FRAMEWORK_NORMAL,
|
|
16
15
|
)
|
|
@@ -77,11 +76,6 @@ class ResPartner(models.Model):
|
|
|
77
76
|
"other government-controlled organizations.",
|
|
78
77
|
)
|
|
79
78
|
|
|
80
|
-
public_entity_type = fields.Selection(
|
|
81
|
-
selection=PUBLIC_ENTIRY_TYPE,
|
|
82
|
-
string="Tipo de Entidade Governamental",
|
|
83
|
-
)
|
|
84
|
-
|
|
85
79
|
ind_final = fields.Selection(
|
|
86
80
|
selection=FINAL_CUSTOMER,
|
|
87
81
|
string="Final Consumption Operation",
|
|
@@ -117,16 +111,6 @@ class ResPartner(models.Model):
|
|
|
117
111
|
string="RNTRC Code", size=12, unaccent=False, tracking=True
|
|
118
112
|
)
|
|
119
113
|
|
|
120
|
-
nif_motive_absence = fields.Selection(
|
|
121
|
-
selection=[
|
|
122
|
-
("0", "Not informed in the origin note"),
|
|
123
|
-
("1", "Exemption from NIF"),
|
|
124
|
-
("2", "NIF not required"),
|
|
125
|
-
],
|
|
126
|
-
default=False,
|
|
127
|
-
string="NIF motive absence",
|
|
128
|
-
)
|
|
129
|
-
|
|
130
114
|
def _inverse_fiscal_profile(self):
|
|
131
115
|
for p in self:
|
|
132
116
|
p._onchange_fiscal_profile_id()
|
|
@@ -143,7 +127,6 @@ class ResPartner(models.Model):
|
|
|
143
127
|
p.tax_framework = p.fiscal_profile_id.tax_framework
|
|
144
128
|
p.ind_ie_dest = p.fiscal_profile_id.ind_ie_dest
|
|
145
129
|
p.is_public_entity = p.fiscal_profile_id.is_public_entity
|
|
146
|
-
p.public_entity_type = p.fiscal_profile_id.public_entity_type
|
|
147
130
|
|
|
148
131
|
@api.onchange("ind_ie_dest")
|
|
149
132
|
def _onchange_ind_ie_dest(self):
|
|
@@ -66,11 +66,3 @@ class SimplifiedTaxRange(models.Model):
|
|
|
66
66
|
tax_pis_percent = fields.Float(
|
|
67
67
|
string="Tax PIS Percent", digits="Fiscal Tax Percent"
|
|
68
68
|
)
|
|
69
|
-
|
|
70
|
-
tax_ibs_percent = fields.Float(
|
|
71
|
-
string="Tax IBS Percent", digits="Fiscal Tax Percent"
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
tax_cbs_percent = fields.Float(
|
|
75
|
-
string="Tax CBS Percent", digits="Fiscal Tax Percent"
|
|
76
|
-
)
|
|
@@ -63,28 +63,13 @@ class TaxDefinition(models.Model):
|
|
|
63
63
|
for record in self:
|
|
64
64
|
record.display_name = record._get_complete_name()
|
|
65
65
|
|
|
66
|
-
@api.depends("tax_group_id", "tax_id", "cst_code")
|
|
67
|
-
def name_get(self):
|
|
68
|
-
result = []
|
|
69
|
-
for record in self:
|
|
70
|
-
name = record._get_complete_name()
|
|
71
|
-
result.append((record.id, name))
|
|
72
|
-
return result
|
|
73
|
-
|
|
74
|
-
display_name = fields.Char(compute="_compute_display_name", store=True)
|
|
75
|
-
|
|
76
66
|
code = fields.Char(
|
|
77
67
|
size=8,
|
|
78
|
-
states={"draft": [("readonly", False)]},
|
|
79
68
|
)
|
|
80
69
|
|
|
81
|
-
name = fields.Char(
|
|
82
|
-
states={"draft": [("readonly", False)]},
|
|
83
|
-
)
|
|
70
|
+
name = fields.Char()
|
|
84
71
|
|
|
85
|
-
description = fields.Text(
|
|
86
|
-
states={"draft": [("readonly", False)]},
|
|
87
|
-
)
|
|
72
|
+
description = fields.Text()
|
|
88
73
|
|
|
89
74
|
type_in_out = fields.Selection(
|
|
90
75
|
selection=FISCAL_IN_OUT,
|
|
@@ -92,7 +77,6 @@ class TaxDefinition(models.Model):
|
|
|
92
77
|
required=True,
|
|
93
78
|
default=FISCAL_OUT,
|
|
94
79
|
readonly=True,
|
|
95
|
-
states={"draft": [("readonly", False)]},
|
|
96
80
|
)
|
|
97
81
|
|
|
98
82
|
tax_group_id = fields.Many2one(
|
|
@@ -100,19 +84,16 @@ class TaxDefinition(models.Model):
|
|
|
100
84
|
string="Tax Group",
|
|
101
85
|
required=True,
|
|
102
86
|
readonly=True,
|
|
103
|
-
states={"draft": [("readonly", False)]},
|
|
104
87
|
)
|
|
105
88
|
|
|
106
89
|
custom_tax = fields.Boolean(
|
|
107
90
|
readonly=True,
|
|
108
|
-
states={"draft": [("readonly", False)]},
|
|
109
91
|
)
|
|
110
92
|
|
|
111
93
|
tax_id = fields.Many2one(
|
|
112
94
|
comodel_name="l10n_br_fiscal.tax",
|
|
113
95
|
string="Tax",
|
|
114
96
|
readonly=True,
|
|
115
|
-
states={"draft": [("readonly", False)]},
|
|
116
97
|
domain="[('tax_group_id', '=', tax_group_id)]",
|
|
117
98
|
)
|
|
118
99
|
|
|
@@ -133,26 +114,22 @@ class TaxDefinition(models.Model):
|
|
|
133
114
|
related="tax_group_id.tax_domain",
|
|
134
115
|
store=True,
|
|
135
116
|
string="Tax Domain",
|
|
136
|
-
states={"draft": [("readonly", False)]},
|
|
137
117
|
)
|
|
138
118
|
|
|
139
119
|
is_taxed = fields.Boolean(
|
|
140
120
|
string="Taxed?",
|
|
141
121
|
readonly=True,
|
|
142
|
-
states={"draft": [("readonly", False)]},
|
|
143
122
|
)
|
|
144
123
|
|
|
145
124
|
is_debit_credit = fields.Boolean(
|
|
146
125
|
string="Debit/Credit?",
|
|
147
126
|
readonly=True,
|
|
148
|
-
states={"draft": [("readonly", False)]},
|
|
149
127
|
)
|
|
150
128
|
|
|
151
129
|
company_id = fields.Many2one(
|
|
152
130
|
comodel_name="res.company",
|
|
153
131
|
string="Company",
|
|
154
132
|
readonly=True,
|
|
155
|
-
states={"draft": [("readonly", False)]},
|
|
156
133
|
)
|
|
157
134
|
|
|
158
135
|
state_from_id = fields.Many2one(
|
|
@@ -170,19 +147,16 @@ class TaxDefinition(models.Model):
|
|
|
170
147
|
ncms = fields.Text(
|
|
171
148
|
string="NCM List",
|
|
172
149
|
readonly=True,
|
|
173
|
-
states={"draft": [("readonly", False)]},
|
|
174
150
|
)
|
|
175
151
|
|
|
176
152
|
ncm_exception = fields.Text(
|
|
177
153
|
string="NCM Exeption",
|
|
178
154
|
readonly=True,
|
|
179
|
-
states={"draft": [("readonly", False)]},
|
|
180
155
|
)
|
|
181
156
|
|
|
182
157
|
not_in_ncms = fields.Text(
|
|
183
158
|
string="Not in NCMs",
|
|
184
159
|
readonly=True,
|
|
185
|
-
states={"draft": [("readonly", False)]},
|
|
186
160
|
)
|
|
187
161
|
|
|
188
162
|
ncm_ids = fields.Many2many(
|
|
@@ -194,7 +168,6 @@ class TaxDefinition(models.Model):
|
|
|
194
168
|
cests = fields.Text(
|
|
195
169
|
string="CEST List",
|
|
196
170
|
readonly=True,
|
|
197
|
-
states={"draft": [("readonly", False)]},
|
|
198
171
|
)
|
|
199
172
|
|
|
200
173
|
cest_ids = fields.Many2many(
|
|
@@ -206,13 +179,11 @@ class TaxDefinition(models.Model):
|
|
|
206
179
|
nbms = fields.Text(
|
|
207
180
|
string="NBM List",
|
|
208
181
|
readonly=True,
|
|
209
|
-
states={"draft": [("readonly", False)]},
|
|
210
182
|
)
|
|
211
183
|
|
|
212
184
|
not_in_nbms = fields.Text(
|
|
213
185
|
string="Not in NBMs",
|
|
214
186
|
readonly=True,
|
|
215
|
-
states={"draft": [("readonly", False)]},
|
|
216
187
|
)
|
|
217
188
|
|
|
218
189
|
nbm_ids = fields.Many2many(
|
|
@@ -245,13 +216,11 @@ class TaxDefinition(models.Model):
|
|
|
245
216
|
date_start = fields.Datetime(
|
|
246
217
|
string="Start Date",
|
|
247
218
|
readonly=True,
|
|
248
|
-
states={"draft": [("readonly", False)]},
|
|
249
219
|
)
|
|
250
220
|
|
|
251
221
|
date_end = fields.Datetime(
|
|
252
222
|
string="End Date",
|
|
253
223
|
readonly=True,
|
|
254
|
-
states={"draft": [("readonly", False)]},
|
|
255
224
|
)
|
|
256
225
|
|
|
257
226
|
state = fields.Selection(
|
|
@@ -286,12 +255,10 @@ class TaxDefinition(models.Model):
|
|
|
286
255
|
is_benefit = fields.Boolean(
|
|
287
256
|
string="Benefit?",
|
|
288
257
|
readonly=True,
|
|
289
|
-
states={"draft": [("readonly", False)]},
|
|
290
258
|
)
|
|
291
259
|
|
|
292
260
|
benefit_type = fields.Selection(
|
|
293
261
|
selection=ICMS_TAX_BENEFIT_TYPE,
|
|
294
|
-
states={"draft": [("readonly", False)]},
|
|
295
262
|
)
|
|
296
263
|
|
|
297
264
|
def _get_search_domain(self, tax_definition):
|
|
@@ -38,9 +38,6 @@
|
|
|
38
38
|
"l10n_br_fiscal_cest_user","Fiscal CEST for User","model_l10n_br_fiscal_cest","l10n_br_fiscal.group_user",1,0,0,0
|
|
39
39
|
"l10n_br_fiscal_cest_manager","Fiscal CEST for Manager","model_l10n_br_fiscal_cest","l10n_br_fiscal.group_manager",1,0,0,0
|
|
40
40
|
"l10n_br_fiscal_cest_maintenance","Fiscal CEST for Maintenance","model_l10n_br_fiscal_cest","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
41
|
-
"l10n_br_fiscal_tax_classification_user","Fiscal Tax Classification for User","model_l10n_br_fiscal_tax_classification","l10n_br_fiscal.group_user",1,0,0,0
|
|
42
|
-
"l10n_br_fiscal_tax_classification_manager","Fiscal Tax Classification for Manager","model_l10n_br_fiscal_tax_classification","l10n_br_fiscal.group_manager",1,0,0,0
|
|
43
|
-
"l10n_br_fiscal_tax_classification_maintenance","Fiscal Tax Classification for Maintenance","model_l10n_br_fiscal_tax_classification","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
44
41
|
"l10n_br_fiscal_product_genre_user","Fiscal Fiscal Product Genre for User","model_l10n_br_fiscal_product_genre","l10n_br_fiscal.group_user",1,0,0,0
|
|
45
42
|
"l10n_br_fiscal_product_genre_manager","Fiscal Fiscal Product Genre for Manager","model_l10n_br_fiscal_product_genre","l10n_br_fiscal.group_manager",1,0,0,0
|
|
46
43
|
"l10n_br_fiscal_product_genre_maintenance","Fiscal Fiscal Product Genre for Maintenance","model_l10n_br_fiscal_product_genre","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
@@ -70,9 +67,6 @@
|
|
|
70
67
|
"l10n_br_fiscal_operation_line_manager","Fiscal Operation Line for Manager","model_l10n_br_fiscal_operation_line","l10n_br_fiscal.group_manager",1,1,1,1
|
|
71
68
|
"l10n_br_fiscal_operation_document_type_user","Fiscal Operation Document Type for User","model_l10n_br_fiscal_operation_document_type","l10n_br_fiscal.group_user",1,0,0,0
|
|
72
69
|
"l10n_br_fiscal_operation_document_type_manager","Fiscal Operation Document Type for Manager","model_l10n_br_fiscal_operation_document_type","l10n_br_fiscal.group_manager",1,1,1,1
|
|
73
|
-
"l10n_br_fiscal_operation_indicator_user","Operation Indicator for User","model_l10n_br_fiscal_operation_indicator","l10n_br_fiscal.group_user",1,0,0,0
|
|
74
|
-
"l10n_br_fiscal_operation_indicator_manager","Operation Indicator for Manager","model_l10n_br_fiscal_operation_indicator","l10n_br_fiscal.group_manager",1,1,1,1
|
|
75
|
-
"l10n_br_fiscal_operation_indicator_maintenance","Operation Indicator for Maintenance","model_l10n_br_fiscal_operation_indicator","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
76
70
|
"l10n_br_fiscal_partner_profile_user","Fiscal Partner Profile for User","model_l10n_br_fiscal_partner_profile","base.group_user",1,0,0,0
|
|
77
71
|
"l10n_br_fiscal_partner_profile_manager","Fiscal Partner Profile for Manager","model_l10n_br_fiscal_partner_profile","l10n_br_fiscal.group_manager",1,1,1,1
|
|
78
72
|
"l10n_br_fiscal_document_user","Fiscal Document for User","model_l10n_br_fiscal_document","l10n_br_fiscal.group_user",1,1,1,0
|
|
@@ -372,10 +372,10 @@ 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:
|
|
375
|
+
!! source digest: sha256:d3d8d4303c70d7d8573dc89abf8f7661a3c19dde6dc541f94971847d33122362
|
|
376
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
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/
|
|
378
|
-
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/l10n-brazil/
|
|
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/17.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-17-0/l10n-brazil-17-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&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
378
|
+
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/l10n-brazil/17.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" /></p>
|
|
379
379
|
<div class="section" id="classificacoes-fiscais">
|
|
380
380
|
<h2>Classificações fiscais</h2>
|
|
381
381
|
<p>Primeramente, este módulo traz uma variedade de cadastros fiscais para
|
|
@@ -513,8 +513,8 @@ como:</p>
|
|
|
513
513
|
<li>ST</li>
|
|
514
514
|
<li>retenções</li>
|
|
515
515
|
</ul>
|
|
516
|
-
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/l10n-brazil/
|
|
517
|
-
<p><img alt="image2" src="https://raw.githubusercontent.com/OCA/l10n-brazil/
|
|
516
|
+
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/l10n-brazil/17.0/l10n_br_fiscal/static/img/fiscal_line.png" /></p>
|
|
517
|
+
<p><img alt="image2" src="https://raw.githubusercontent.com/OCA/l10n-brazil/17.0/l10n_br_fiscal/static/img/fiscal_total.png" /></p>
|
|
518
518
|
<p>É notório que o cálculo dos impostos no Brasil é muito especial e muito
|
|
519
519
|
trabalhoso. Geralmente é o motivo pelo qual os ERPs internacionais não
|
|
520
520
|
tem grande fatia de mercado brasileiro.</p>
|
|
@@ -543,7 +543,7 @@ Tributária)…</p>
|
|
|
543
543
|
<div class="section" id="operacoes-fiscais">
|
|
544
544
|
<h2>Operações fiscais</h2>
|
|
545
545
|
<blockquote>
|
|
546
|
-
<img alt="image3" src="https://raw.githubusercontent.com/OCA/l10n-brazil/
|
|
546
|
+
<img alt="image3" src="https://raw.githubusercontent.com/OCA/l10n-brazil/17.0/l10n_br_fiscal/static/img/fiscal_operation.png" /></blockquote>
|
|
547
547
|
<p>No Odoo nativo, o conceito mais parecido com a operação fiscal e o
|
|
548
548
|
<tt class="docutils literal">account.fiscal.position</tt>. E ate a versão 10.0, era o que a gente
|
|
549
549
|
usava. Porém, a posição fiscal do Odoo não resolve muito os nossos
|
|
@@ -610,7 +610,7 @@ l10n_br_sale, l10n_br_purchase…</p>
|
|
|
610
610
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-brazil/issues">GitHub Issues</a>.
|
|
611
611
|
In case of trouble, please check there if your issue has already been reported.
|
|
612
612
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
613
|
-
<a class="reference external" href="https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_fiscal%0Aversion:%
|
|
613
|
+
<a class="reference external" href="https://github.com/OCA/l10n-brazil/issues/new?body=module:%20l10n_br_fiscal%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
|
614
614
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
615
615
|
</div>
|
|
616
616
|
<div class="section" id="credits">
|
|
@@ -659,7 +659,7 @@ mission is to support the collaborative development of Odoo features and
|
|
|
659
659
|
promote its widespread use.</p>
|
|
660
660
|
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
|
661
661
|
<p><a class="reference external image-reference" href="https://github.com/renatonlima"><img alt="renatonlima" src="https://github.com/renatonlima.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/rvalyi"><img alt="rvalyi" src="https://github.com/rvalyi.png?size=40px" /></a></p>
|
|
662
|
-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-brazil/tree/
|
|
662
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-brazil/tree/17.0/l10n_br_fiscal">OCA/l10n-brazil</a> project on GitHub.</p>
|
|
663
663
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
|
664
664
|
</div>
|
|
665
665
|
</div>
|
|
@@ -6,8 +6,7 @@ from odoo.tests.common import TransactionCase
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class TestCNAE(TransactionCase):
|
|
9
|
-
def
|
|
10
|
-
"""Test CNAE name_get()"""
|
|
9
|
+
def test_display_name(self):
|
|
11
10
|
self.cnae = self.env["l10n_br_fiscal.cnae"].create(
|
|
12
11
|
{
|
|
13
12
|
"code": "TESTE",
|
|
@@ -16,4 +15,4 @@ class TestCNAE(TransactionCase):
|
|
|
16
15
|
"internal_type": "normal",
|
|
17
16
|
}
|
|
18
17
|
)
|
|
19
|
-
|
|
18
|
+
self.assertEqual(self.cnae.display_name, "TESTE - TESTE")
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
from unittest import mock
|
|
5
5
|
|
|
6
6
|
from odoo.tests import TransactionCase
|
|
7
|
-
from odoo.tests.common import Form
|
|
7
|
+
from odoo.tests.common import Form
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@tagged("post_install", "-at_install")
|
|
11
10
|
class TestDocumentEdition(TransactionCase):
|
|
12
11
|
@classmethod
|
|
13
12
|
def setUpClass(cls):
|
|
@@ -80,46 +79,20 @@ class TestDocumentEdition(TransactionCase):
|
|
|
80
79
|
line_form.fiscal_operation_line_id,
|
|
81
80
|
self.env.ref("l10n_br_fiscal.fo_venda_revenda"),
|
|
82
81
|
)
|
|
83
|
-
self.assertEqual(
|
|
84
|
-
line_form.ipi_tax_id, self.env.ref("l10n_br_fiscal.tax_ipi_nt")
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
line_form.fiscal_operation_line_id = self.env.ref(
|
|
88
|
-
"l10n_br_fiscal.fo_venda_venda"
|
|
89
|
-
)
|
|
90
|
-
self.assertEqual(
|
|
91
|
-
line_form.ipi_tax_id, self.env.ref("l10n_br_fiscal.tax_ipi_3_25")
|
|
92
|
-
)
|
|
93
82
|
|
|
94
|
-
#
|
|
95
|
-
|
|
96
|
-
self.assertEqual(line_form.icms_value, 37.17)
|
|
97
|
-
self.assertEqual(
|
|
98
|
-
line_form.ipi_tax_id, self.env.ref("l10n_br_fiscal.tax_ipi_3_25")
|
|
99
|
-
)
|
|
100
|
-
line_form.icmsfcp_base = line_form.price_unit
|
|
101
|
-
line_form.icmsfcp_value = 3 # ensure manually setting FCP value works
|
|
83
|
+
# line_form.fiscal_operation_line_id = False
|
|
84
|
+
# self.assertEqual(len(line_form.fiscal_tax_ids), 0)
|
|
102
85
|
|
|
103
86
|
doc = doc_form.save()
|
|
104
|
-
|
|
105
|
-
self.assertEqual(
|
|
106
|
-
self.assertEqual(
|
|
107
|
-
self.assertEqual(
|
|
108
|
-
self.assertEqual(
|
|
109
|
-
self.assertEqual(len(line.fiscal_tax_ids), 4)
|
|
110
|
-
|
|
111
|
-
self.assertEqual(
|
|
112
|
-
line.fiscal_operation_line_id,
|
|
113
|
-
self.env.ref("l10n_br_fiscal.fo_venda_venda"),
|
|
114
|
-
)
|
|
87
|
+
self.assertEqual(doc.fiscal_line_ids[0].price_unit, 100)
|
|
88
|
+
self.assertEqual(doc.fiscal_line_ids[0].fiscal_price, 100)
|
|
89
|
+
self.assertEqual(doc.fiscal_line_ids[0].quantity, 2)
|
|
90
|
+
self.assertEqual(doc.fiscal_line_ids[0].fiscal_quantity, 2)
|
|
91
|
+
self.assertEqual(len(doc.fiscal_line_ids[0].fiscal_tax_ids), 4)
|
|
115
92
|
self.assertEqual(
|
|
116
|
-
|
|
117
|
-
self.ref("l10n_br_fiscal.
|
|
93
|
+
doc.fiscal_line_ids[0].icms_tax_id.id,
|
|
94
|
+
self.ref("l10n_br_fiscal.tax_icms_12"),
|
|
118
95
|
)
|
|
119
|
-
self.assertEqual(line.ipi_tax_id, self.env.ref("l10n_br_fiscal.tax_ipi_3_25"))
|
|
120
|
-
self.assertEqual(line.icms_value, 37.17)
|
|
121
|
-
self.assertEqual(line.icmsfcp_base, line.price_unit)
|
|
122
|
-
self.assertEqual(line.icmsfcp_value, 3)
|
|
123
96
|
|
|
124
97
|
def test_product_fiscal_factor(self):
|
|
125
98
|
doc_form = Form(
|
|
@@ -44,6 +44,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
44
44
|
# as the product change might have altered it.
|
|
45
45
|
line.price_unit = 100
|
|
46
46
|
|
|
47
|
+
line._onchange_fiscal_operation_id()
|
|
48
|
+
line._onchange_fiscal_taxes()
|
|
49
|
+
|
|
47
50
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
48
51
|
self.assertEqual(
|
|
49
52
|
line.cfop_id.code,
|
|
@@ -158,6 +161,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
158
161
|
def test_nfe_other_state(self):
|
|
159
162
|
"""Test NFe other state."""
|
|
160
163
|
for line in self.nfe_other_state.fiscal_line_ids:
|
|
164
|
+
line._onchange_fiscal_operation_id()
|
|
165
|
+
line._onchange_fiscal_taxes()
|
|
166
|
+
|
|
161
167
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
162
168
|
self.assertEqual(
|
|
163
169
|
line.cfop_id.code,
|
|
@@ -269,6 +275,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
269
275
|
def test_nfe_not_taxpayer(self):
|
|
270
276
|
"""Test NFe not taxpayer."""
|
|
271
277
|
for line in self.nfe_not_taxpayer.fiscal_line_ids:
|
|
278
|
+
line._onchange_fiscal_operation_id()
|
|
279
|
+
line._onchange_fiscal_taxes()
|
|
280
|
+
|
|
272
281
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
273
282
|
self.assertEqual(
|
|
274
283
|
line.cfop_id.code,
|
|
@@ -367,6 +376,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
367
376
|
def test_nfe_not_taxpayer_not_company(self):
|
|
368
377
|
"""Test NFe not taxpayer not Company."""
|
|
369
378
|
for line in self.nfe_not_taxpayer_pf.fiscal_line_ids:
|
|
379
|
+
line._onchange_fiscal_operation_id()
|
|
380
|
+
line._onchange_fiscal_taxes()
|
|
381
|
+
|
|
370
382
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
371
383
|
self.assertEqual(
|
|
372
384
|
line.cfop_id.code,
|
|
@@ -465,6 +477,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
465
477
|
def test_nfe_export(self):
|
|
466
478
|
"""Test NFe export."""
|
|
467
479
|
for line in self.nfe_export.fiscal_line_ids:
|
|
480
|
+
line._onchange_fiscal_operation_id()
|
|
481
|
+
line._onchange_fiscal_taxes()
|
|
482
|
+
|
|
468
483
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
469
484
|
self.assertEqual(
|
|
470
485
|
line.cfop_id.code,
|
|
@@ -565,9 +580,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
565
580
|
"federal_taxes_national": 33.00,
|
|
566
581
|
}
|
|
567
582
|
)
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
line.
|
|
583
|
+
|
|
584
|
+
line._onchange_fiscal_operation_id()
|
|
585
|
+
line._onchange_fiscal_taxes()
|
|
571
586
|
|
|
572
587
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
573
588
|
self.assertEqual(
|
|
@@ -666,6 +681,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
666
681
|
def test_nfe_sn_other_state(self):
|
|
667
682
|
"""Test NFe SN other state."""
|
|
668
683
|
for line in self.nfe_sn_other_state.fiscal_line_ids:
|
|
684
|
+
line._onchange_fiscal_operation_id()
|
|
685
|
+
line._onchange_fiscal_taxes()
|
|
686
|
+
|
|
669
687
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
670
688
|
self.assertEqual(
|
|
671
689
|
line.cfop_id.code,
|
|
@@ -760,6 +778,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
760
778
|
def test_nfe_sn_not_taxpayer(self):
|
|
761
779
|
"""Test NFe SN not taxpayer."""
|
|
762
780
|
for line in self.nfe_sn_not_taxpayer.fiscal_line_ids:
|
|
781
|
+
line._onchange_fiscal_operation_id()
|
|
782
|
+
line._onchange_fiscal_taxes()
|
|
783
|
+
|
|
763
784
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
764
785
|
self.assertEqual(
|
|
765
786
|
line.cfop_id.code,
|
|
@@ -841,6 +862,9 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
841
862
|
def test_nfe_sn_export(self):
|
|
842
863
|
"""Test NFe SN export."""
|
|
843
864
|
for line in self.nfe_sn_export.fiscal_line_ids:
|
|
865
|
+
line._onchange_fiscal_operation_id()
|
|
866
|
+
line._onchange_fiscal_taxes()
|
|
867
|
+
|
|
844
868
|
if "Revenda" in line.fiscal_operation_line_id.name:
|
|
845
869
|
self.assertEqual(
|
|
846
870
|
line.cfop_id.code,
|
|
@@ -950,7 +974,7 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
950
974
|
additional_data = self.nfe_not_taxpayer.fiscal_line_ids[0].additional_data
|
|
951
975
|
self.assertEqual(
|
|
952
976
|
additional_data,
|
|
953
|
-
"manual comment test
|
|
977
|
+
"manual comment test",
|
|
954
978
|
)
|
|
955
979
|
|
|
956
980
|
def test_fields_freight_insurance_other_costs(self):
|
|
@@ -13,7 +13,11 @@ class TestFiscalDocumentNFSe(TransactionCase):
|
|
|
13
13
|
|
|
14
14
|
def test_nfse_same_state(self):
|
|
15
15
|
"""Test NFSe same state."""
|
|
16
|
+
|
|
16
17
|
for line in self.nfse_same_state.fiscal_line_ids:
|
|
18
|
+
line._onchange_fiscal_operation_id()
|
|
19
|
+
line._onchange_fiscal_taxes()
|
|
20
|
+
|
|
17
21
|
self.assertEqual(
|
|
18
22
|
line.fiscal_operation_line_id.name,
|
|
19
23
|
"Prestação de Serviço",
|
|
@@ -6,9 +6,8 @@ from odoo.tests.common import TransactionCase
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class TestServiceType(TransactionCase):
|
|
9
|
-
def
|
|
10
|
-
"""Test Service Type name_get()"""
|
|
9
|
+
def test_display_name(self):
|
|
11
10
|
self.service_type = self.env["l10n_br_fiscal.service.type"].create(
|
|
12
11
|
{"code": "TESTE", "name": "TESTE", "internal_type": "normal"}
|
|
13
12
|
)
|
|
14
|
-
|
|
13
|
+
self.assertEqual(self.service_type.display_name, "TESTE - TESTE")
|