odoo-addon-l10n-br-fiscal 16.0.12.3.0__py3-none-any.whl → 18.0.1.0.0.6__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 +10 -10
- odoo/addons/l10n_br_fiscal/__init__.py +3 -3
- odoo/addons/l10n_br_fiscal/__manifest__.py +3 -2
- odoo/addons/l10n_br_fiscal/constants/fiscal.py +5 -6
- odoo/addons/l10n_br_fiscal/data/ir_cron.xml +19 -34
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal_cfop_data.xml +0 -2
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal_data.xml +6 -8
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal_icms_tax_definition_data.xml +4055 -4033
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal_server_action.xml +0 -2
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal_tax_icms_data.xml +54 -50
- odoo/addons/l10n_br_fiscal/data/operation_data.xml +197 -181
- odoo/addons/l10n_br_fiscal/data/product_data.xml +2 -4
- odoo/addons/l10n_br_fiscal/data/res_partner_data.xml +0 -2
- odoo/addons/l10n_br_fiscal/data/simplified_tax_data.xml +0 -2
- odoo/addons/l10n_br_fiscal/data/uom_data.xml +0 -2
- odoo/addons/l10n_br_fiscal/demo/city_taxation_code_demo.xml +0 -2
- odoo/addons/l10n_br_fiscal/demo/company_demo.xml +0 -3
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_demo.xml +37 -49
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_nfse_demo.xml +0 -1
- odoo/addons/l10n_br_fiscal/demo/fiscal_operation_demo.xml +0 -2
- odoo/addons/l10n_br_fiscal/demo/icms_tax_definition_demo.xml +0 -2
- odoo/addons/l10n_br_fiscal/demo/partner_demo.xml +0 -2
- odoo/addons/l10n_br_fiscal/demo/product_demo.xml +0 -1705
- odoo/addons/l10n_br_fiscal/demo/res_users_demo.xml +0 -2
- odoo/addons/l10n_br_fiscal/hooks.py +68 -0
- odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +50 -592
- odoo/addons/l10n_br_fiscal/models/cfop.py +1 -1
- odoo/addons/l10n_br_fiscal/models/cnae.py +2 -2
- odoo/addons/l10n_br_fiscal/models/comment.py +14 -29
- odoo/addons/l10n_br_fiscal/models/cst.py +2 -2
- odoo/addons/l10n_br_fiscal/models/data_abstract.py +19 -33
- odoo/addons/l10n_br_fiscal/models/document.py +2 -5
- odoo/addons/l10n_br_fiscal/models/document_mixin.py +0 -2
- odoo/addons/l10n_br_fiscal/models/document_serie.py +6 -4
- odoo/addons/l10n_br_fiscal/models/document_type.py +0 -1
- odoo/addons/l10n_br_fiscal/models/ibpt.py +1 -1
- odoo/addons/l10n_br_fiscal/models/invalidate_number.py +6 -13
- odoo/addons/l10n_br_fiscal/models/legal_nature.py +1 -1
- odoo/addons/l10n_br_fiscal/models/nbm.py +2 -2
- odoo/addons/l10n_br_fiscal/models/nbs.py +4 -4
- odoo/addons/l10n_br_fiscal/models/ncm.py +4 -4
- odoo/addons/l10n_br_fiscal/models/operation.py +2 -13
- odoo/addons/l10n_br_fiscal/models/operation_dashboard.py +1 -1
- odoo/addons/l10n_br_fiscal/models/operation_line.py +1 -1
- odoo/addons/l10n_br_fiscal/models/partner_profile.py +1 -1
- odoo/addons/l10n_br_fiscal/models/tax.py +5 -1
- odoo/addons/l10n_br_fiscal/models/tax_definition.py +2 -35
- odoo/addons/l10n_br_fiscal/models/tax_group.py +6 -6
- odoo/addons/l10n_br_fiscal/models/tax_pis_cofins.py +4 -4
- odoo/addons/l10n_br_fiscal/models/tax_pis_cofins_base.py +2 -2
- odoo/addons/l10n_br_fiscal/models/tax_pis_cofins_credit.py +2 -2
- odoo/addons/l10n_br_fiscal/security/fiscal_security.xml +0 -2
- odoo/addons/l10n_br_fiscal/static/description/index.html +8 -8
- odoo/addons/l10n_br_fiscal/tests/test_cnae.py +2 -3
- odoo/addons/l10n_br_fiscal/tests/test_document_edition.py +35 -36
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_generic.py +3 -2
- odoo/addons/l10n_br_fiscal/tests/test_service_type.py +2 -3
- odoo/addons/l10n_br_fiscal/views/cest_view.xml +4 -4
- odoo/addons/l10n_br_fiscal/views/cfop_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/city_taxation_code.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/cnae_view.xml +2 -3
- odoo/addons/l10n_br_fiscal/views/comment_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/cst_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/document_line_mixin_view.xml +170 -140
- odoo/addons/l10n_br_fiscal/views/document_line_view.xml +7 -7
- odoo/addons/l10n_br_fiscal/views/document_related_view.xml +17 -13
- odoo/addons/l10n_br_fiscal/views/document_serie_view.xml +3 -3
- odoo/addons/l10n_br_fiscal/views/document_type_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/document_view.xml +37 -37
- odoo/addons/l10n_br_fiscal/views/icms_regulation_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/icms_relief_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/invalidate_number_view.xml +14 -14
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_action.xml +36 -36
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_menu.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/legal_nature_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/nbm_view.xml +7 -7
- odoo/addons/l10n_br_fiscal/views/nbs_view.xml +6 -6
- odoo/addons/l10n_br_fiscal/views/ncm_view.xml +8 -8
- odoo/addons/l10n_br_fiscal/views/operation_dashboard_view.xml +33 -25
- odoo/addons/l10n_br_fiscal/views/operation_line_view.xml +4 -4
- odoo/addons/l10n_br_fiscal/views/operation_view.xml +43 -20
- odoo/addons/l10n_br_fiscal/views/partner_profile_view.xml +5 -8
- odoo/addons/l10n_br_fiscal/views/product_genre_view.xml +4 -4
- odoo/addons/l10n_br_fiscal/views/product_product_view.xml +17 -20
- odoo/addons/l10n_br_fiscal/views/product_template_view.xml +16 -13
- odoo/addons/l10n_br_fiscal/views/res_company_view.xml +17 -12
- odoo/addons/l10n_br_fiscal/views/res_config_settings_view.xml +44 -105
- odoo/addons/l10n_br_fiscal/views/res_partner_view.xml +3 -3
- odoo/addons/l10n_br_fiscal/views/service_type_view.xml +7 -8
- odoo/addons/l10n_br_fiscal/views/simplified_tax_range_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/simplified_tax_view.xml +4 -4
- odoo/addons/l10n_br_fiscal/views/tax_definition_view.xml +64 -33
- odoo/addons/l10n_br_fiscal/views/tax_estimate_view.xml +4 -4
- odoo/addons/l10n_br_fiscal/views/tax_group_view.xml +6 -6
- odoo/addons/l10n_br_fiscal/views/tax_ipi_control_seal_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/tax_ipi_guideline_class_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/tax_ipi_guideline_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/tax_pis_cofins_base_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/tax_pis_cofins_credit_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/tax_pis_cofins_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/views/tax_view.xml +16 -18
- odoo/addons/l10n_br_fiscal/views/uom_uom.xml +2 -2
- 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.12.3.0.dist-info → odoo_addon_l10n_br_fiscal-18.0.1.0.0.6.dist-info}/METADATA +15 -15
- {odoo_addon_l10n_br_fiscal-16.0.12.3.0.dist-info → odoo_addon_l10n_br_fiscal-18.0.1.0.0.6.dist-info}/RECORD +108 -112
- 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_addon_l10n_br_fiscal-16.0.12.3.0.dist-info → odoo_addon_l10n_br_fiscal-18.0.1.0.0.6.dist-info}/WHEEL +0 -0
- {odoo_addon_l10n_br_fiscal-16.0.12.3.0.dist-info → odoo_addon_l10n_br_fiscal-18.0.1.0.0.6.dist-info}/top_level.txt +0 -0
|
@@ -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):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (C) 2019 Renato Lima - Akretion <renato.lima@akretion.com.br>
|
|
2
2
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import fields, models
|
|
5
5
|
|
|
6
6
|
from ..constants.fiscal import TAX_DOMAIN
|
|
7
7
|
|
|
@@ -29,10 +29,10 @@ class TaxGroup(models.Model):
|
|
|
29
29
|
|
|
30
30
|
tax_scope = fields.Selection(
|
|
31
31
|
selection=[
|
|
32
|
-
("city",
|
|
33
|
-
("state",
|
|
34
|
-
("federal",
|
|
35
|
-
("other",
|
|
32
|
+
("city", "City"),
|
|
33
|
+
("state", "State"),
|
|
34
|
+
("federal", "Federal"),
|
|
35
|
+
("other", "Other"),
|
|
36
36
|
],
|
|
37
37
|
required=True,
|
|
38
38
|
)
|
|
@@ -75,6 +75,6 @@ class TaxGroup(models.Model):
|
|
|
75
75
|
(
|
|
76
76
|
"fiscal_tax_group_code_uniq",
|
|
77
77
|
"unique (name)",
|
|
78
|
-
|
|
78
|
+
"Tax Group already exists with this name!",
|
|
79
79
|
)
|
|
80
80
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (C) 2019 Renato Lima - Akretion <renato.lima@akretion.com.br>
|
|
2
2
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import api, fields, models
|
|
5
5
|
|
|
6
6
|
from .. import tools
|
|
7
7
|
from ..constants.fiscal import (
|
|
@@ -22,9 +22,9 @@ class TaxPisCofins(models.Model):
|
|
|
22
22
|
|
|
23
23
|
piscofins_type = fields.Selection(
|
|
24
24
|
selection=[
|
|
25
|
-
("ncm",
|
|
26
|
-
("product",
|
|
27
|
-
("company",
|
|
25
|
+
("ncm", "NCM"),
|
|
26
|
+
("product", "Product"),
|
|
27
|
+
("company", "Company"),
|
|
28
28
|
],
|
|
29
29
|
default="ncm",
|
|
30
30
|
string="Type",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (C) 2019 Renato Lima - Akretion
|
|
2
2
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import fields, models
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class TaxPisCofinsBase(models.Model):
|
|
@@ -15,6 +15,6 @@ class TaxPisCofinsBase(models.Model):
|
|
|
15
15
|
(
|
|
16
16
|
"l10n_br_fiscal_tax_pis_cofins_base_uniq",
|
|
17
17
|
"unique (code)",
|
|
18
|
-
|
|
18
|
+
"Already exists with this code!",
|
|
19
19
|
)
|
|
20
20
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (C) 2019 Renato Lima - Akretion
|
|
2
2
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import fields, models
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class TaxPisCofinsCredit(models.Model):
|
|
@@ -15,6 +15,6 @@ class TaxPisCofinsCredit(models.Model):
|
|
|
15
15
|
(
|
|
16
16
|
"l10n_br_fiscal_tax_pis_cofins_code_uniq",
|
|
17
17
|
"unique (code)",
|
|
18
|
-
|
|
18
|
+
"Already exists with this code!",
|
|
19
19
|
)
|
|
20
20
|
]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
2
|
<odoo noupdate="1">
|
|
3
|
-
|
|
4
3
|
<record id="module_category_l10n_br_fiscal_management" model="ir.module.category">
|
|
5
4
|
<field name="name">Brazilian Fiscal</field>
|
|
6
5
|
<field
|
|
@@ -79,5 +78,4 @@
|
|
|
79
78
|
name="domain_force"
|
|
80
79
|
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
|
81
80
|
</record>
|
|
82
|
-
|
|
83
81
|
</odoo>
|
|
@@ -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:0a81c278185fba9ee231db553d75d0193012c162e10738ae9013f1a562b11ad0
|
|
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/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&target_branch=18.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/18.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/18.0/l10n_br_fiscal/static/img/fiscal_line.png" /></p>
|
|
517
|
+
<p><img alt="image2" src="https://raw.githubusercontent.com/OCA/l10n-brazil/18.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/18.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:%2018.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/18.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")
|
|
@@ -3,15 +3,38 @@
|
|
|
3
3
|
|
|
4
4
|
from unittest import mock
|
|
5
5
|
|
|
6
|
-
from odoo
|
|
7
|
-
from odoo.tests
|
|
6
|
+
from odoo import Command
|
|
7
|
+
from odoo.tests import Form, TransactionCase
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class TestDocumentEdition(TransactionCase):
|
|
11
11
|
@classmethod
|
|
12
12
|
def setUpClass(cls):
|
|
13
13
|
super().setUpClass()
|
|
14
|
-
cls.
|
|
14
|
+
cls.user = cls.env["res.users"].create(
|
|
15
|
+
{
|
|
16
|
+
"name": "Fiscal User",
|
|
17
|
+
"login": "fiscaluser",
|
|
18
|
+
"password": "fiscaluser",
|
|
19
|
+
"groups_id": [
|
|
20
|
+
Command.set(cls.env.user.groups_id.ids),
|
|
21
|
+
Command.link(cls.env.ref("l10n_br_fiscal.group_user").id),
|
|
22
|
+
Command.link(cls.env.ref("base.group_multi_company").id),
|
|
23
|
+
],
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
cls.user.partner_id.email = "accountman@test.com"
|
|
27
|
+
companies = cls.env["res.company"].search([])
|
|
28
|
+
cls.user.write(
|
|
29
|
+
{
|
|
30
|
+
"company_ids": [Command.set(companies.ids)],
|
|
31
|
+
"company_id": cls.env.ref("l10n_br_base.empresa_lucro_presumido"),
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
cls.env = cls.env(
|
|
36
|
+
user=cls.user, context=dict(cls.env.context, tracking_disable=True)
|
|
37
|
+
)
|
|
15
38
|
|
|
16
39
|
def test_basic_doc_edition(self):
|
|
17
40
|
doc_form = Form(
|
|
@@ -75,42 +98,20 @@ class TestDocumentEdition(TransactionCase):
|
|
|
75
98
|
line_form.fiscal_operation_line_id,
|
|
76
99
|
self.env.ref("l10n_br_fiscal.fo_venda_revenda"),
|
|
77
100
|
)
|
|
78
|
-
self.assertEqual(
|
|
79
|
-
line_form.ipi_tax_id, self.env.ref("l10n_br_fiscal.tax_ipi_nt")
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
line_form.fiscal_operation_line_id = self.env.ref(
|
|
83
|
-
"l10n_br_fiscal.fo_venda_venda"
|
|
84
|
-
)
|
|
85
|
-
self.assertEqual(
|
|
86
|
-
line_form.ipi_tax_id, self.env.ref("l10n_br_fiscal.tax_ipi_3_25")
|
|
87
|
-
)
|
|
88
101
|
|
|
89
|
-
#
|
|
90
|
-
|
|
91
|
-
self.assertEqual(line_form.icms_value, 37.17)
|
|
92
|
-
self.assertEqual(
|
|
93
|
-
line_form.ipi_tax_id, self.env.ref("l10n_br_fiscal.tax_ipi_3_25")
|
|
94
|
-
)
|
|
102
|
+
# line_form.fiscal_operation_line_id = False
|
|
103
|
+
# self.assertEqual(len(line_form.fiscal_tax_ids), 0)
|
|
95
104
|
|
|
96
105
|
doc = doc_form.save()
|
|
97
|
-
|
|
98
|
-
self.assertEqual(
|
|
99
|
-
self.assertEqual(
|
|
100
|
-
self.assertEqual(
|
|
101
|
-
self.assertEqual(
|
|
102
|
-
self.assertEqual(len(line.fiscal_tax_ids), 4)
|
|
103
|
-
|
|
104
|
-
self.assertEqual(
|
|
105
|
-
line.fiscal_operation_line_id,
|
|
106
|
-
self.env.ref("l10n_br_fiscal.fo_venda_venda"),
|
|
107
|
-
)
|
|
106
|
+
self.assertEqual(doc.fiscal_line_ids[0].price_unit, 100)
|
|
107
|
+
self.assertEqual(doc.fiscal_line_ids[0].fiscal_price, 100)
|
|
108
|
+
self.assertEqual(doc.fiscal_line_ids[0].quantity, 2)
|
|
109
|
+
self.assertEqual(doc.fiscal_line_ids[0].fiscal_quantity, 2)
|
|
110
|
+
self.assertEqual(len(doc.fiscal_line_ids[0].fiscal_tax_ids), 4)
|
|
108
111
|
self.assertEqual(
|
|
109
|
-
|
|
110
|
-
self.ref("l10n_br_fiscal.
|
|
112
|
+
doc.fiscal_line_ids[0].icms_tax_id.id,
|
|
113
|
+
self.ref("l10n_br_fiscal.tax_icms_12"),
|
|
111
114
|
)
|
|
112
|
-
self.assertEqual(line.ipi_tax_id, self.env.ref("l10n_br_fiscal.tax_ipi_3_25"))
|
|
113
|
-
self.assertEqual(line.icms_value, 37.17)
|
|
114
115
|
|
|
115
116
|
def test_product_fiscal_factor(self):
|
|
116
117
|
doc_form = Form(
|
|
@@ -118,7 +119,6 @@ class TestDocumentEdition(TransactionCase):
|
|
|
118
119
|
default_fiscal_operation_type="out",
|
|
119
120
|
)
|
|
120
121
|
)
|
|
121
|
-
doc_form.company_id = self.env.ref("l10n_br_base.empresa_lucro_presumido")
|
|
122
122
|
doc_form.partner_id = self.env.ref("l10n_br_base.res_partner_cliente1_sp")
|
|
123
123
|
doc_form.fiscal_operation_id = self.env.ref("l10n_br_fiscal.fo_venda")
|
|
124
124
|
doc_form.ind_final = "1"
|
|
@@ -141,7 +141,6 @@ class TestDocumentEdition(TransactionCase):
|
|
|
141
141
|
default_fiscal_operation_type="out",
|
|
142
142
|
)
|
|
143
143
|
)
|
|
144
|
-
doc_form.company_id = self.env.ref("l10n_br_base.empresa_lucro_presumido")
|
|
145
144
|
doc_form.partner_id = self.env.ref("l10n_br_base.res_partner_cliente1_sp")
|
|
146
145
|
doc_form.fiscal_operation_id = self.env.ref("l10n_br_fiscal.fo_venda")
|
|
147
146
|
doc_form.ind_final = "1"
|
|
@@ -77,9 +77,10 @@ class TestFiscalDocumentGeneric(TransactionCase):
|
|
|
77
77
|
# ICMS
|
|
78
78
|
self.assertTrue(
|
|
79
79
|
is_icms_internal,
|
|
80
|
-
"Error to mapping ICMS Inernal for
|
|
80
|
+
"Error to mapping ICMS Inernal for "
|
|
81
|
+
f"{self.nfe_same_state.partner_id.state_id.name}"
|
|
81
82
|
" for Venda de Contribuinte Dentro do "
|
|
82
|
-
"Estado."
|
|
83
|
+
"Estado.",
|
|
83
84
|
)
|
|
84
85
|
self.assertEqual(
|
|
85
86
|
line.icms_cst_id.code,
|
|
@@ -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")
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
<field name="name">l10n_br_fiscal.cest.tree</field>
|
|
26
26
|
<field name="model">l10n_br_fiscal.cest</field>
|
|
27
27
|
<field name="arch" type="xml">
|
|
28
|
-
<
|
|
28
|
+
<list>
|
|
29
29
|
<field name="code" />
|
|
30
30
|
<field name="item" />
|
|
31
31
|
<field name="name" />
|
|
32
32
|
<field name="segment" />
|
|
33
|
-
</
|
|
33
|
+
</list>
|
|
34
34
|
</field>
|
|
35
35
|
</record>
|
|
36
36
|
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
id="product_tmpl_button"
|
|
48
48
|
icon="fa-bars"
|
|
49
49
|
name="%(product.product_template_action_all)d"
|
|
50
|
-
context="{'search_default_cest_id':
|
|
51
|
-
|
|
50
|
+
context="{'search_default_cest_id': id}"
|
|
51
|
+
invisible="product_tmpl_qty == 0"
|
|
52
52
|
>
|
|
53
53
|
<field
|
|
54
54
|
string="Products"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<field name="name">l10n_br_fiscal.cfop.tree</field>
|
|
47
47
|
<field name="model">l10n_br_fiscal.cfop</field>
|
|
48
48
|
<field name="arch" type="xml">
|
|
49
|
-
<
|
|
49
|
+
<list>
|
|
50
50
|
<field name="code" />
|
|
51
51
|
<field name="name" />
|
|
52
52
|
<field name="type_in_out" />
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<field name="ind_anula" optional="hide" />
|
|
62
62
|
<field name="ind_remes" optional="hide" />
|
|
63
63
|
<field name="ind_comb" optional="hide" />
|
|
64
|
-
</
|
|
64
|
+
</list>
|
|
65
65
|
</field>
|
|
66
66
|
</record>
|
|
67
67
|
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
<field name="name">city.taxation.code.tree (in l10n_br_fiscal)</field>
|
|
22
22
|
<field name="model">l10n_br_fiscal.city.taxation.code</field>
|
|
23
23
|
<field name="arch" type="xml">
|
|
24
|
-
<
|
|
24
|
+
<list>
|
|
25
25
|
<field name="code" />
|
|
26
26
|
<field name="name" />
|
|
27
27
|
<field name="service_type_id" />
|
|
28
28
|
<field name="state_id" />
|
|
29
29
|
<field name="city_id" />
|
|
30
30
|
<field name="cnae_id" />
|
|
31
|
-
</
|
|
31
|
+
</list>
|
|
32
32
|
</field>
|
|
33
33
|
</record>
|
|
34
34
|
|
|
@@ -22,14 +22,13 @@
|
|
|
22
22
|
<record id="cnae_tree" model="ir.ui.view">
|
|
23
23
|
<field name="name">l10n_br_fiscal.cnae.tree</field>
|
|
24
24
|
<field name="model">l10n_br_fiscal.cnae</field>
|
|
25
|
-
<field name="field_parent">children_ids</field>
|
|
26
25
|
<field name="arch" type="xml">
|
|
27
|
-
<
|
|
26
|
+
<list>
|
|
28
27
|
<field name="code" />
|
|
29
28
|
<field name="name" />
|
|
30
29
|
<field name="version" />
|
|
31
30
|
<field name="parent_id" />
|
|
32
|
-
</
|
|
31
|
+
</list>
|
|
33
32
|
</field>
|
|
34
33
|
</record>
|
|
35
34
|
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
<field name="name">l10n_br_fiscal.comment.tree</field>
|
|
23
23
|
<field name="model">l10n_br_fiscal.comment</field>
|
|
24
24
|
<field name="arch" type="xml">
|
|
25
|
-
<
|
|
25
|
+
<list>
|
|
26
26
|
<field name="sequence" />
|
|
27
27
|
<field name="name" />
|
|
28
28
|
<field name="comment_type" />
|
|
29
29
|
<field name="object" />
|
|
30
30
|
<field name="date_begin" />
|
|
31
31
|
<field name="date_end" />
|
|
32
|
-
</
|
|
32
|
+
</list>
|
|
33
33
|
</field>
|
|
34
34
|
</record>
|
|
35
35
|
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
<field name="name">l10n_br_fiscal.cst.tree</field>
|
|
26
26
|
<field name="model">l10n_br_fiscal.cst</field>
|
|
27
27
|
<field name="arch" type="xml">
|
|
28
|
-
<
|
|
28
|
+
<list>
|
|
29
29
|
<field name="code" />
|
|
30
30
|
<field name="name" />
|
|
31
31
|
<field name="cst_type" />
|
|
32
32
|
<field name="tax_group_id" />
|
|
33
|
-
</
|
|
33
|
+
</list>
|
|
34
34
|
</field>
|
|
35
35
|
</record>
|
|
36
36
|
|