odoo-addon-l10n-br-fiscal 16.0.2.17.0__py3-none-any.whl → 16.0.19.4.0__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 +11 -4
- odoo/addons/l10n_br_fiscal/__manifest__.py +20 -12
- odoo/addons/l10n_br_fiscal/constants/fiscal.py +64 -18
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.cest.csv +1043 -983
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.cfop.csv +620 -620
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.cst.csv +58 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.document.type.csv +1 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.legal.nature.csv +82 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.nbs.csv +791 -764
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.operation.indicator.csv +27 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.partner.profile.csv +11 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.tax.classification.csv +163 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.tax.csv +32 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.tax.group.csv +3 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal_icms_tax_definition_data.xml +340 -352
- odoo/addons/l10n_br_fiscal/data/operation_data.xml +1 -1
- odoo/addons/l10n_br_fiscal/data/simplified_tax_data.xml +5 -5
- odoo/addons/l10n_br_fiscal/data/uom.alias.csv +25 -0
- odoo/addons/l10n_br_fiscal/data/uom_data.xml +104 -33
- odoo/addons/l10n_br_fiscal/demo/__init__.py +21 -15
- odoo/addons/l10n_br_fiscal/demo/company_demo.xml +6 -0
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_demo.xml +3 -377
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_nfse_demo.xml +0 -12
- odoo/addons/l10n_br_fiscal/demo/fiscal_operation_demo.xml +2 -2
- odoo/addons/l10n_br_fiscal/demo/icms_tax_definition_demo.xml +5 -2
- odoo/addons/l10n_br_fiscal/demo/res_users_demo.xml +2 -2
- odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +1161 -804
- odoo/addons/l10n_br_fiscal/i18n/pt_BR.po +22 -22
- odoo/addons/l10n_br_fiscal/migrations/16.0.13.0.0/pre-migration.py +25 -0
- odoo/addons/l10n_br_fiscal/migrations/16.0.14.0.0/pre-migration.py +30 -0
- odoo/addons/l10n_br_fiscal/migrations/16.0.14.0.5/pre-migration.py +15 -0
- odoo/addons/l10n_br_fiscal/migrations/16.0.4.0.0/pre-migration.py +220 -0
- odoo/addons/l10n_br_fiscal/migrations/16.0.5.0.0/pre-migration.py +33 -0
- odoo/addons/l10n_br_fiscal/migrations/16.0.5.2.0/pre-migration.py +21 -0
- odoo/addons/l10n_br_fiscal/models/__init__.py +3 -8
- odoo/addons/l10n_br_fiscal/models/cest.py +0 -8
- odoo/addons/l10n_br_fiscal/models/cfop.py +91 -0
- odoo/addons/l10n_br_fiscal/models/city_taxation_code.py +1 -3
- odoo/addons/l10n_br_fiscal/models/comment.py +2 -2
- odoo/addons/l10n_br_fiscal/models/cst.py +0 -1
- odoo/addons/l10n_br_fiscal/models/data_abstract.py +26 -0
- odoo/addons/l10n_br_fiscal/models/data_ncm_nbs_abstract.py +1 -1
- odoo/addons/l10n_br_fiscal/models/document.py +131 -222
- odoo/addons/l10n_br_fiscal/models/document_line.py +82 -5
- odoo/addons/l10n_br_fiscal/models/document_line_mixin.py +1952 -138
- odoo/addons/l10n_br_fiscal/models/document_mixin.py +741 -6
- odoo/addons/l10n_br_fiscal/models/document_related.py +12 -9
- odoo/addons/l10n_br_fiscal/models/document_serie.py +33 -0
- odoo/addons/l10n_br_fiscal/models/document_type.py +0 -6
- odoo/addons/l10n_br_fiscal/models/ibpt.py +1 -1
- odoo/addons/l10n_br_fiscal/models/icms_regulation.py +2 -2
- odoo/addons/l10n_br_fiscal/models/invalidate_number.py +4 -5
- odoo/addons/l10n_br_fiscal/models/legal_nature.py +20 -0
- odoo/addons/l10n_br_fiscal/models/nbm.py +0 -8
- odoo/addons/l10n_br_fiscal/models/ncm.py +0 -12
- odoo/addons/l10n_br_fiscal/models/operation.py +49 -15
- odoo/addons/l10n_br_fiscal/models/operation_dashboard.py +3 -2
- odoo/addons/l10n_br_fiscal/models/operation_indicator.py +58 -0
- odoo/addons/l10n_br_fiscal/models/operation_line.py +75 -6
- odoo/addons/l10n_br_fiscal/models/partner_profile.py +6 -0
- odoo/addons/l10n_br_fiscal/models/product_mixin.py +24 -21
- odoo/addons/l10n_br_fiscal/models/product_template.py +23 -13
- odoo/addons/l10n_br_fiscal/models/res_company.py +31 -9
- odoo/addons/l10n_br_fiscal/models/res_partner.py +38 -6
- odoo/addons/l10n_br_fiscal/models/simplified_tax.py +0 -3
- odoo/addons/l10n_br_fiscal/models/simplified_tax_range.py +8 -0
- odoo/addons/l10n_br_fiscal/models/tax.py +144 -55
- odoo/addons/l10n_br_fiscal/models/tax_classification.py +81 -0
- odoo/addons/l10n_br_fiscal/models/tax_definition.py +72 -23
- odoo/addons/l10n_br_fiscal/models/tax_pis_cofins.py +0 -3
- odoo/addons/l10n_br_fiscal/models/tax_pis_cofins_base.py +1 -1
- odoo/addons/l10n_br_fiscal/models/tax_pis_cofins_credit.py +1 -1
- odoo/addons/l10n_br_fiscal/models/uom_uom.py +15 -30
- odoo/addons/l10n_br_fiscal/security/fiscal_security.xml +11 -27
- odoo/addons/l10n_br_fiscal/security/ir.model.access.csv +11 -10
- odoo/addons/l10n_br_fiscal/static/description/index.html +27 -21
- odoo/addons/l10n_br_fiscal/static/src/js/list_renderer_with_button.esm.js +38 -0
- odoo/addons/l10n_br_fiscal/tests/__init__.py +3 -2
- odoo/addons/l10n_br_fiscal/tests/test_document_edition.py +308 -0
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_generic.py +23 -129
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_nfse.py +5 -15
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_serie.py +60 -0
- odoo/addons/l10n_br_fiscal/tests/test_ibpt.py +4 -3
- odoo/addons/l10n_br_fiscal/tests/test_icms_regulation.py +2 -2
- odoo/addons/l10n_br_fiscal/tests/test_ncm.py +4 -1
- odoo/addons/l10n_br_fiscal/tests/test_tax_benefit.py +17 -22
- odoo/addons/l10n_br_fiscal/tests/test_tax_classification.py +110 -0
- odoo/addons/l10n_br_fiscal/tools.py +1 -1
- odoo/addons/l10n_br_fiscal/views/cest_view.xml +2 -4
- odoo/addons/l10n_br_fiscal/views/cfop_view.xml +25 -5
- odoo/addons/l10n_br_fiscal/views/city_taxation_code.xml +1 -4
- odoo/addons/l10n_br_fiscal/views/cnae_view.xml +2 -4
- odoo/addons/l10n_br_fiscal/views/comment_view.xml +2 -4
- odoo/addons/l10n_br_fiscal/views/cst_view.xml +6 -8
- odoo/addons/l10n_br_fiscal/views/{document_fiscal_line_mixin_view.xml → document_line_mixin_view.xml} +525 -385
- odoo/addons/l10n_br_fiscal/views/document_line_view.xml +101 -82
- odoo/addons/l10n_br_fiscal/views/document_related_view.xml +44 -46
- odoo/addons/l10n_br_fiscal/views/document_serie_view.xml +2 -6
- odoo/addons/l10n_br_fiscal/views/document_type_view.xml +0 -8
- odoo/addons/l10n_br_fiscal/views/document_view.xml +303 -370
- odoo/addons/l10n_br_fiscal/views/icms_regulation_view.xml +14 -16
- odoo/addons/l10n_br_fiscal/views/icms_relief_view.xml +8 -10
- odoo/addons/l10n_br_fiscal/views/invalidate_number_view.xml +46 -48
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_action.xml +166 -280
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_menu.xml +25 -99
- odoo/addons/l10n_br_fiscal/views/legal_nature_view.xml +40 -0
- odoo/addons/l10n_br_fiscal/views/nbm_view.xml +5 -6
- odoo/addons/l10n_br_fiscal/views/nbs_view.xml +5 -6
- odoo/addons/l10n_br_fiscal/views/ncm_view.xml +12 -15
- odoo/addons/l10n_br_fiscal/views/operation_dashboard_view.xml +13 -12
- odoo/addons/l10n_br_fiscal/views/operation_indicator_view.xml +75 -0
- odoo/addons/l10n_br_fiscal/views/operation_line_view.xml +22 -21
- odoo/addons/l10n_br_fiscal/views/operation_view.xml +4 -19
- odoo/addons/l10n_br_fiscal/views/partner_profile_view.xml +3 -6
- odoo/addons/l10n_br_fiscal/views/product_genre_view.xml +7 -9
- odoo/addons/l10n_br_fiscal/views/product_product_view.xml +37 -14
- odoo/addons/l10n_br_fiscal/views/product_template_view.xml +34 -14
- odoo/addons/l10n_br_fiscal/views/res_company_view.xml +55 -52
- odoo/addons/l10n_br_fiscal/views/res_config_settings_view.xml +23 -28
- odoo/addons/l10n_br_fiscal/views/res_partner_view.xml +22 -2
- odoo/addons/l10n_br_fiscal/views/service_type_view.xml +7 -8
- odoo/addons/l10n_br_fiscal/views/simplified_tax_range_view.xml +0 -2
- odoo/addons/l10n_br_fiscal/views/simplified_tax_view.xml +0 -2
- odoo/addons/l10n_br_fiscal/views/tax_classification.xml +110 -0
- odoo/addons/l10n_br_fiscal/views/tax_definition_view.xml +157 -129
- odoo/addons/l10n_br_fiscal/views/tax_estimate_view.xml +0 -2
- odoo/addons/l10n_br_fiscal/views/tax_group_view.xml +3 -6
- odoo/addons/l10n_br_fiscal/views/tax_ipi_control_seal_view.xml +0 -2
- odoo/addons/l10n_br_fiscal/views/tax_ipi_guideline_class_view.xml +0 -2
- odoo/addons/l10n_br_fiscal/views/tax_ipi_guideline_view.xml +2 -4
- odoo/addons/l10n_br_fiscal/views/tax_pis_cofins_base_view.xml +2 -4
- odoo/addons/l10n_br_fiscal/views/tax_pis_cofins_credit_view.xml +2 -4
- odoo/addons/l10n_br_fiscal/views/tax_pis_cofins_view.xml +5 -7
- odoo/addons/l10n_br_fiscal/views/tax_view.xml +5 -7
- odoo/addons/l10n_br_fiscal/views/uom_uom.xml +24 -17
- odoo/addons/l10n_br_fiscal/wizards/__init__.py +1 -0
- odoo/addons/l10n_br_fiscal/wizards/base_wizard_mixin.py +1 -1
- odoo/addons/l10n_br_fiscal/wizards/document_import_wizard_mixin.py +129 -0
- odoo/addons/l10n_br_fiscal/wizards/document_import_wizard_mixin.xml +41 -0
- {odoo_addon_l10n_br_fiscal-16.0.2.17.0.dist-info → odoo_addon_l10n_br_fiscal-16.0.19.4.0.dist-info}/METADATA +15 -6
- odoo_addon_l10n_br_fiscal-16.0.19.4.0.dist-info/RECORD +210 -0
- {odoo_addon_l10n_br_fiscal-16.0.2.17.0.dist-info → odoo_addon_l10n_br_fiscal-16.0.19.4.0.dist-info}/WHEEL +1 -1
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal_email_template.xml +0 -68
- odoo/addons/l10n_br_fiscal/data/partner_profile_data.xml +0 -96
- odoo/addons/l10n_br_fiscal/data/uom_alternative_data.xml +0 -58
- odoo/addons/l10n_br_fiscal/demo/l10n_br_fiscal_document_email.xml +0 -54
- odoo/addons/l10n_br_fiscal/demo/subsequent_operation_demo.xml +0 -10
- odoo/addons/l10n_br_fiscal/models/document_email.py +0 -74
- odoo/addons/l10n_br_fiscal/models/document_line_mixin_methods.py +0 -913
- odoo/addons/l10n_br_fiscal/models/document_mixin_fields.py +0 -473
- odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py +0 -269
- odoo/addons/l10n_br_fiscal/models/document_move_mixin.py +0 -261
- odoo/addons/l10n_br_fiscal/models/subsequent_document.py +0 -203
- odoo/addons/l10n_br_fiscal/models/subsequent_operation.py +0 -54
- odoo/addons/l10n_br_fiscal/models/uom_uom_alternative.py +0 -22
- odoo/addons/l10n_br_fiscal/tests/test_subsequent_operation.py +0 -71
- odoo/addons/l10n_br_fiscal/tests/test_uom_uom.py +0 -22
- odoo/addons/l10n_br_fiscal/views/document_email_view.xml +0 -48
- odoo/addons/l10n_br_fiscal/views/subsequent_document_view.xml +0 -43
- odoo/addons/l10n_br_fiscal/views/subsequent_operation_view.xml +0 -21
- odoo_addon_l10n_br_fiscal-16.0.2.17.0.dist-info/RECORD +0 -205
- {odoo_addon_l10n_br_fiscal-16.0.2.17.0.dist-info → odoo_addon_l10n_br_fiscal-16.0.19.4.0.dist-info}/top_level.txt +0 -0
|
@@ -16,6 +16,41 @@ from ..constants.icms import ICMS_TAX_BENEFIT_TYPE
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class TaxDefinition(models.Model):
|
|
19
|
+
"""
|
|
20
|
+
Represents a detailed rule item within the Brazilian Fiscal Rule Engine.
|
|
21
|
+
|
|
22
|
+
This model also acts as a mapping layer, defining specific tax
|
|
23
|
+
treatments (which tax to apply, with which CST/CSOSN, and under what
|
|
24
|
+
conditions) based on a combination of contextual fiscal parameters.
|
|
25
|
+
It essentially defines a "fiscal rule" that dictates how a particular
|
|
26
|
+
tax should behave in a given scenario.
|
|
27
|
+
|
|
28
|
+
Each `tax.definition` record links various fiscal entities such as:
|
|
29
|
+
- Partner Fiscal Profiles (`fiscal_profile_id`)
|
|
30
|
+
- Fiscal Operations and their Lines (`fiscal_operation_line_id`)
|
|
31
|
+
- Company-level defaults (`company_id`)
|
|
32
|
+
- CFOPs (`cfop_id`)
|
|
33
|
+
- ICMS Regulations (`icms_regulation_id`)
|
|
34
|
+
|
|
35
|
+
to a specific:
|
|
36
|
+
- Tax Group (`tax_group_id`)
|
|
37
|
+
- Tax (`tax_id`)
|
|
38
|
+
- CST/CSOSN code (`cst_id`)
|
|
39
|
+
|
|
40
|
+
Furthermore, it allows for conditions based on:
|
|
41
|
+
- Originating and destination states (`state_from_id`, `state_to_ids`)
|
|
42
|
+
- Product characteristics (NCM, CEST, NBM, specific products, type)
|
|
43
|
+
- Partner characteristics (tax framework, ICMS taxpayer status, final consumer)
|
|
44
|
+
- Company tax framework
|
|
45
|
+
- Date validity (`date_start`, `date_end`)
|
|
46
|
+
- Tax benefits (ICMS relief, IPI guidelines)
|
|
47
|
+
|
|
48
|
+
The system uses these definitions, particularly through the
|
|
49
|
+
`map_tax_definition` method, to determine the precise set of taxes and
|
|
50
|
+
their configurations applicable to a transaction line. This model is
|
|
51
|
+
central to the dynamic and context-sensitive application of Brazilian taxes.
|
|
52
|
+
"""
|
|
53
|
+
|
|
19
54
|
_name = "l10n_br_fiscal.tax.definition"
|
|
20
55
|
_inherit = ["mail.thread", "mail.activity.mixin"]
|
|
21
56
|
_description = "Tax Definition"
|
|
@@ -92,14 +127,12 @@ class TaxDefinition(models.Model):
|
|
|
92
127
|
cst_code = fields.Char(
|
|
93
128
|
string="CST Code",
|
|
94
129
|
related="cst_id.code",
|
|
95
|
-
readonly=True,
|
|
96
130
|
)
|
|
97
131
|
|
|
98
132
|
tax_domain = fields.Selection(
|
|
99
133
|
related="tax_group_id.tax_domain",
|
|
100
134
|
store=True,
|
|
101
135
|
string="Tax Domain",
|
|
102
|
-
readonly=True,
|
|
103
136
|
states={"draft": [("readonly", False)]},
|
|
104
137
|
)
|
|
105
138
|
|
|
@@ -130,9 +163,6 @@ class TaxDefinition(models.Model):
|
|
|
130
163
|
|
|
131
164
|
state_to_ids = fields.Many2many(
|
|
132
165
|
comodel_name="res.country.state",
|
|
133
|
-
relation="tax_definition_state_to_rel",
|
|
134
|
-
column1="tax_definition_id",
|
|
135
|
-
column2="state_id",
|
|
136
166
|
string="To States",
|
|
137
167
|
domain=[("country_id.code", "=", "BR")],
|
|
138
168
|
)
|
|
@@ -157,9 +187,6 @@ class TaxDefinition(models.Model):
|
|
|
157
187
|
|
|
158
188
|
ncm_ids = fields.Many2many(
|
|
159
189
|
comodel_name="l10n_br_fiscal.ncm",
|
|
160
|
-
relation="tax_definition_ncm_rel",
|
|
161
|
-
column1="tax_definition_id",
|
|
162
|
-
column2="ncm_id",
|
|
163
190
|
readonly=True,
|
|
164
191
|
string="NCMs",
|
|
165
192
|
)
|
|
@@ -172,9 +199,6 @@ class TaxDefinition(models.Model):
|
|
|
172
199
|
|
|
173
200
|
cest_ids = fields.Many2many(
|
|
174
201
|
comodel_name="l10n_br_fiscal.cest",
|
|
175
|
-
relation="tax_definition_cest_rel",
|
|
176
|
-
column1="tax_definition_id",
|
|
177
|
-
column2="cest_id",
|
|
178
202
|
readonly=True,
|
|
179
203
|
string="CESTs",
|
|
180
204
|
)
|
|
@@ -193,34 +217,23 @@ class TaxDefinition(models.Model):
|
|
|
193
217
|
|
|
194
218
|
nbm_ids = fields.Many2many(
|
|
195
219
|
comodel_name="l10n_br_fiscal.nbm",
|
|
196
|
-
relation="tax_definition_nbm_rel",
|
|
197
|
-
column1="tax_definition_id",
|
|
198
|
-
column2="nbm_id",
|
|
199
220
|
readonly=True,
|
|
200
221
|
string="NBMs",
|
|
201
222
|
)
|
|
202
223
|
|
|
203
224
|
product_ids = fields.Many2many(
|
|
204
225
|
comodel_name="product.product",
|
|
205
|
-
relation="tax_definition_product_rel",
|
|
206
|
-
column1="tax_definition_id",
|
|
207
|
-
column2="product_id",
|
|
208
226
|
string="Products",
|
|
209
227
|
)
|
|
210
228
|
|
|
211
229
|
city_taxation_code_ids = fields.Many2many(
|
|
212
230
|
comodel_name="l10n_br_fiscal.city.taxation.code",
|
|
213
|
-
relation="tax_definition_city_taxation_code_rel",
|
|
214
|
-
column1="tax_definition_id",
|
|
215
|
-
column2="city_taxation_code_id",
|
|
231
|
+
relation="tax_definition_city_taxation_code_rel", # (orm default is too long)
|
|
216
232
|
string="City Taxation Codes",
|
|
217
233
|
)
|
|
218
234
|
|
|
219
235
|
service_type_ids = fields.Many2many(
|
|
220
236
|
comodel_name="l10n_br_fiscal.service.type",
|
|
221
|
-
relation="tax_definition_service_type_rel",
|
|
222
|
-
column1="tax_definition_id",
|
|
223
|
-
column2="service_type_id",
|
|
224
237
|
string="Fiscal Service Types",
|
|
225
238
|
)
|
|
226
239
|
|
|
@@ -433,6 +446,42 @@ class TaxDefinition(models.Model):
|
|
|
433
446
|
city_taxation_code=None,
|
|
434
447
|
service_type=None,
|
|
435
448
|
):
|
|
449
|
+
"""
|
|
450
|
+
Filter and return tax definitions that match the given criteria.
|
|
451
|
+
|
|
452
|
+
This method is used to find the relevant tax definitions from a
|
|
453
|
+
pre-existing recordset (self) based on the transactional context
|
|
454
|
+
(company, partner, product, etc.). It constructs a domain to
|
|
455
|
+
filter these records.
|
|
456
|
+
|
|
457
|
+
The matching is based on:
|
|
458
|
+
- Current record state (not 'expired').
|
|
459
|
+
- Originating state (state_from_id).
|
|
460
|
+
- Destination states (state_to_ids), allowing for no specific destination.
|
|
461
|
+
- NCM, NBM, CEST codes, allowing for no specific code.
|
|
462
|
+
- City taxation codes, allowing for no specific code.
|
|
463
|
+
- Service types, allowing for no specific type.
|
|
464
|
+
- Specific products, allowing for no specific product.
|
|
465
|
+
|
|
466
|
+
:param company: The company record (res.company) of the transaction.
|
|
467
|
+
:param partner: The partner record (res.partner) of the transaction.
|
|
468
|
+
:param product: The product record (product.product) of the transaction.
|
|
469
|
+
:param ncm: Optional NCM record (l10n_br_fiscal.ncm);
|
|
470
|
+
defaults to product's NCM.
|
|
471
|
+
:param nbm: Optional NBM record (l10n_br_fiscal.nbm);
|
|
472
|
+
defaults to product's NBM.
|
|
473
|
+
:param nbs: Optional NBS record (l10n_br_fiscal.nbs);
|
|
474
|
+
(Note: nbs not used in current domain construction)
|
|
475
|
+
:param cest: Optional CEST record (l10n_br_fiscal.cest);
|
|
476
|
+
defaults to product's CEST.
|
|
477
|
+
:param city_taxation_code: Optional City Taxation Code record
|
|
478
|
+
(l10n_br_fiscal.city.taxation.code).
|
|
479
|
+
:param service_type: Optional Service Type record
|
|
480
|
+
(l10n_br_fiscal.service.type).
|
|
481
|
+
:return: A recordset of matching
|
|
482
|
+
l10n_br_fiscal.tax.definition.
|
|
483
|
+
"""
|
|
484
|
+
|
|
436
485
|
if not ncm:
|
|
437
486
|
ncm = product.ncm_id
|
|
438
487
|
|
|
@@ -1,39 +1,24 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025 Engenere.one
|
|
2
2
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
3
3
|
|
|
4
|
-
from odoo import
|
|
4
|
+
from odoo import fields, models
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class Uom(models.Model):
|
|
8
|
-
|
|
9
|
-
_inherit = ["uom.uom", "mail.thread", "mail.activity.mixin"]
|
|
8
|
+
_inherit = "uom.uom"
|
|
10
9
|
|
|
11
|
-
code = fields.Char(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
code = fields.Char(
|
|
11
|
+
size=6,
|
|
12
|
+
translate=False,
|
|
13
|
+
help="Abbreviated unit code used in electronic fiscal documents "
|
|
14
|
+
"(e.g. NF-e, NFC-e). Must have a maximum of 6 characters "
|
|
15
|
+
"by regulation. e.g. 'UN', 'KG', 'LITRO', 'CX12UN",
|
|
17
16
|
)
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
alternative = (
|
|
23
|
-
self.env["uom.uom.alternative"]
|
|
24
|
-
.search([("code", code_operator, code_value)])
|
|
25
|
-
.mapped("uom_id")
|
|
26
|
-
)
|
|
27
|
-
domain = [
|
|
28
|
-
("id", "in", alternative.ids)
|
|
29
|
-
if x[0] == "code" and x[2] == code_value and alternative.ids
|
|
30
|
-
else x
|
|
31
|
-
for x in domain
|
|
32
|
-
]
|
|
33
|
-
return domain
|
|
18
|
+
description = fields.Char(
|
|
19
|
+
help="Full unit description. e.g. 'Unit', 'Kilogram', 'Box of 12 Units'.",
|
|
20
|
+
)
|
|
34
21
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
domain = self._get_code_domain(sub_domain, domain)
|
|
39
|
-
return super().search(domain, *args, **kwargs)
|
|
22
|
+
_sql_constraints = [
|
|
23
|
+
("unique_code", "UNIQUE(code)", "Unit of Measure code must be unique!")
|
|
24
|
+
]
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
<record id="group_manager" model="res.groups">
|
|
18
18
|
<field name="name">Fiscal Manager</field>
|
|
19
19
|
<field name="category_id" ref="module_category_l10n_br_fiscal_management" />
|
|
20
|
-
<field
|
|
20
|
+
<field
|
|
21
|
+
name="implied_ids"
|
|
22
|
+
eval="[Command.link(ref('l10n_br_fiscal.group_user'))]"
|
|
23
|
+
/>
|
|
21
24
|
</record>
|
|
22
25
|
|
|
23
26
|
<record id="group_data_maintenance" model="res.groups">
|
|
@@ -28,7 +31,7 @@
|
|
|
28
31
|
<record id="base.user_admin" model="res.users">
|
|
29
32
|
<field
|
|
30
33
|
name="groups_id"
|
|
31
|
-
eval="[(
|
|
34
|
+
eval="[Command.link(ref('l10n_br_fiscal.group_manager')), Command.link(ref('l10n_br_fiscal.group_data_maintenance'))]"
|
|
32
35
|
/>
|
|
33
36
|
</record>
|
|
34
37
|
|
|
@@ -36,54 +39,35 @@
|
|
|
36
39
|
<field name="name">Fiscal Tax Estimate multi-company</field>
|
|
37
40
|
<field name="model_id" ref="model_l10n_br_fiscal_tax_estimate" />
|
|
38
41
|
<field eval="True" name="global" />
|
|
39
|
-
<field
|
|
40
|
-
name="domain_force"
|
|
41
|
-
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
|
42
|
+
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
|
|
42
43
|
</record>
|
|
43
44
|
|
|
44
|
-
<record id="
|
|
45
|
+
<record id="l10n_br_fiscal_operation_rule" model="ir.rule">
|
|
45
46
|
<field name="name">Fiscal Operation multi-company</field>
|
|
46
47
|
<field name="model_id" ref="model_l10n_br_fiscal_operation" />
|
|
47
48
|
<field eval="True" name="global" />
|
|
48
|
-
<field
|
|
49
|
-
name="domain_force"
|
|
50
|
-
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
|
49
|
+
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
|
|
51
50
|
</record>
|
|
52
51
|
|
|
53
52
|
<record id="l10n_br_fiscal_document_serie_rule" model="ir.rule">
|
|
54
53
|
<field name="name">Fiscal Document Serie multi-company</field>
|
|
55
54
|
<field name="model_id" ref="model_l10n_br_fiscal_document_serie" />
|
|
56
55
|
<field eval="True" name="global" />
|
|
57
|
-
<field
|
|
58
|
-
name="domain_force"
|
|
59
|
-
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
|
56
|
+
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
|
|
60
57
|
</record>
|
|
61
58
|
|
|
62
59
|
<record id="l10n_br_fiscal_document_rule" model="ir.rule">
|
|
63
60
|
<field name="name">Fiscal Document multi-company</field>
|
|
64
61
|
<field name="model_id" ref="model_l10n_br_fiscal_document" />
|
|
65
62
|
<field eval="True" name="global" />
|
|
66
|
-
<field
|
|
67
|
-
name="domain_force"
|
|
68
|
-
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
|
63
|
+
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
|
|
69
64
|
</record>
|
|
70
65
|
|
|
71
66
|
<record id="l10n_br_fiscal_document_line_rule" model="ir.rule">
|
|
72
67
|
<field name="name">Fiscal Document line multi-company</field>
|
|
73
68
|
<field name="model_id" ref="model_l10n_br_fiscal_document_line" />
|
|
74
69
|
<field eval="True" name="global" />
|
|
75
|
-
<field
|
|
76
|
-
name="domain_force"
|
|
77
|
-
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
|
78
|
-
</record>
|
|
79
|
-
|
|
80
|
-
<record id="l10n_br_fiscal_document_email_rule" model="ir.rule">
|
|
81
|
-
<field name="name">Fiscal Document Email multi-company</field>
|
|
82
|
-
<field name="model_id" ref="model_l10n_br_fiscal_document_email" />
|
|
83
|
-
<field eval="True" name="global" />
|
|
84
|
-
<field
|
|
85
|
-
name="domain_force"
|
|
86
|
-
>['|',('company_id','=',False),('company_id','in',company_ids)]</field>
|
|
70
|
+
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
|
|
87
71
|
</record>
|
|
88
72
|
|
|
89
73
|
</odoo>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
|
2
|
+
"l10n_br_fiscal_legal_nature_user","Legal Nature for User","model_l10n_br_fiscal_legal_nature","l10n_br_fiscal.group_user",1,0,0,0
|
|
3
|
+
"l10n_br_fiscal_legal_nature_manager","Legal Nature for Manager","model_l10n_br_fiscal_legal_nature","l10n_br_fiscal.group_manager",1,0,0,0
|
|
4
|
+
"l10n_br_fiscal_legal_nature_maintenance","Legal Nature for Data Maintenance","model_l10n_br_fiscal_legal_nature","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
2
5
|
"l10n_br_fiscal_cnae_user","CNAE for User","model_l10n_br_fiscal_cnae","l10n_br_fiscal.group_user",1,0,0,0
|
|
3
6
|
"l10n_br_fiscal_cnae_manager","CNAE for Manager","model_l10n_br_fiscal_cnae","l10n_br_fiscal.group_manager",1,0,0,0
|
|
4
7
|
"l10n_br_fiscal_cnae_maintenance","CNAE for Data Maintenance","model_l10n_br_fiscal_cnae","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
@@ -35,14 +38,15 @@
|
|
|
35
38
|
"l10n_br_fiscal_cest_user","Fiscal CEST for User","model_l10n_br_fiscal_cest","l10n_br_fiscal.group_user",1,0,0,0
|
|
36
39
|
"l10n_br_fiscal_cest_manager","Fiscal CEST for Manager","model_l10n_br_fiscal_cest","l10n_br_fiscal.group_manager",1,0,0,0
|
|
37
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
|
|
38
44
|
"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
|
|
39
45
|
"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
|
|
40
46
|
"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
|
|
41
47
|
"l10n_br_fiscal_document_type_user","Fiscal Document Type for User","model_l10n_br_fiscal_document_type","l10n_br_fiscal.group_user",1,0,0,0
|
|
42
48
|
"l10n_br_fiscal_document_type_manager","Fiscal Document Type for Manager","model_l10n_br_fiscal_document_type","l10n_br_fiscal.group_manager",1,0,0,0
|
|
43
49
|
"l10n_br_fiscal_document_type_maintenance","Fiscal Document Type for Maintenance","model_l10n_br_fiscal_document_type","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
44
|
-
"l10n_br_fiscal_document_email_user","Fiscal Document Email for User","model_l10n_br_fiscal_document_email","l10n_br_fiscal.group_user",1,0,0,0
|
|
45
|
-
"l10n_br_fiscal_document_email_manager","Fiscal Document Email for Manager","model_l10n_br_fiscal_document_email","l10n_br_fiscal.group_manager",1,1,1,1
|
|
46
50
|
"l10n_br_fiscal_document_serie_user","Fiscal Document Serie for User","model_l10n_br_fiscal_document_serie","l10n_br_fiscal.group_user",1,0,0,0
|
|
47
51
|
"l10n_br_fiscal_document_serie_manager","Fiscal Document Serie for Manager","model_l10n_br_fiscal_document_serie","l10n_br_fiscal.group_manager",1,1,1,1
|
|
48
52
|
"l10n_br_fiscal_simplified_tax_user","Fiscal Simplified Tax for User","model_l10n_br_fiscal_simplified_tax","l10n_br_fiscal.group_user",1,0,0,0
|
|
@@ -62,14 +66,14 @@
|
|
|
62
66
|
"l10n_br_fiscal_tax_ipi_guideline_class_maintenance","IPI Guideline Class for Maintenance","model_l10n_br_fiscal_tax_ipi_guideline_class","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
63
67
|
"l10n_br_fiscal_operation_user","Fiscal Operation for User","model_l10n_br_fiscal_operation","l10n_br_fiscal.group_user",1,0,0,0
|
|
64
68
|
"l10n_br_fiscal_operation_manager","Fiscal Operation for Manager","model_l10n_br_fiscal_operation","l10n_br_fiscal.group_manager",1,1,1,1
|
|
65
|
-
"l10n_br_fiscal_subsequent_operation","Fiscal Subsequent Operation for Manager","model_l10n_br_fiscal_subsequent_operation","l10n_br_fiscal.group_manager",1,1,1,1
|
|
66
|
-
"l10n_br_fiscal_subsequent_document","Fiscal Subsequent Document for Manager","model_l10n_br_fiscal_subsequent_document","l10n_br_fiscal.group_manager",1,1,1,1
|
|
67
|
-
"l10n_br_fiscal_subsequent_document_user","Fiscal Subsequent Document for User","model_l10n_br_fiscal_subsequent_document","l10n_br_fiscal.group_user",1,0,0,0
|
|
68
69
|
"l10n_br_fiscal_operation_line_user","Fiscal Operation Line for User","model_l10n_br_fiscal_operation_line","l10n_br_fiscal.group_user",1,0,0,0
|
|
69
70
|
"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
|
|
70
71
|
"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
|
|
71
72
|
"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
|
|
72
|
-
"
|
|
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
|
+
"l10n_br_fiscal_partner_profile_user","Fiscal Partner Profile for User","model_l10n_br_fiscal_partner_profile","base.group_user",1,0,0,0
|
|
73
77
|
"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
|
|
74
78
|
"l10n_br_fiscal_document_user","Fiscal Document for User","model_l10n_br_fiscal_document","l10n_br_fiscal.group_user",1,1,1,0
|
|
75
79
|
"l10n_br_fiscal_document_manager","Fiscal Document for Manager","model_l10n_br_fiscal_document","l10n_br_fiscal.group_manager",1,1,1,1
|
|
@@ -92,12 +96,9 @@
|
|
|
92
96
|
"l10n_br_fiscal_tax_pis_cofins_credit_user","Tax PIS COFINS Credit for User","model_l10n_br_fiscal_tax_pis_cofins_credit","l10n_br_fiscal.group_user",1,0,0,0
|
|
93
97
|
"l10n_br_fiscal_tax_pis_cofins_credit_manager","Tax PIS COFINS Credit for Manager","model_l10n_br_fiscal_tax_pis_cofins_credit","l10n_br_fiscal.group_manager",1,0,0,0
|
|
94
98
|
"l10n_br_fiscal_tax_pis_cofins_credit_maintenance","Tax PIS COFINS Credit for Maintenance","model_l10n_br_fiscal_tax_pis_cofins_credit","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
95
|
-
"uom_alternative_user","UOM alternative for User","model_uom_uom_alternative","l10n_br_fiscal.group_user",1,0,0,0
|
|
96
|
-
"uom_alternative_manager","UOM alternative for Manager","model_uom_uom_alternative","l10n_br_fiscal.group_manager",1,0,0,0
|
|
97
|
-
"uom_alternative_maintenance","UOM alternative for Maintenance","model_uom_uom_alternative","l10n_br_fiscal.group_data_maintenance",1,1,1,1
|
|
98
99
|
"l10n_br_fiscal_invalidate_number_user","user_l10n_br_fiscal_invalidate_number","model_l10n_br_fiscal_invalidate_number","l10n_br_fiscal.group_user",1,0,0,0
|
|
99
100
|
"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
|
|
100
101
|
"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
|
|
101
102
|
"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
|
|
102
|
-
"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
|
|
103
103
|
"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
|
|
104
|
+
"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
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
5
5
|
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
|
6
|
-
<title>
|
|
6
|
+
<title>README.rst</title>
|
|
7
7
|
<style type="text/css">
|
|
8
8
|
|
|
9
9
|
/*
|
|
@@ -360,19 +360,24 @@ ul.auto-toc {
|
|
|
360
360
|
</style>
|
|
361
361
|
</head>
|
|
362
362
|
<body>
|
|
363
|
-
<div class="document"
|
|
364
|
-
<h1 class="title">Módulo fiscal brasileiro</h1>
|
|
363
|
+
<div class="document">
|
|
365
364
|
|
|
365
|
+
|
|
366
|
+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
|
|
367
|
+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
|
|
368
|
+
</a>
|
|
369
|
+
<div class="section" id="modulo-fiscal-brasileiro">
|
|
370
|
+
<h1>Módulo fiscal brasileiro</h1>
|
|
366
371
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
367
372
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
373
|
!! changes will be overwritten. !!
|
|
369
374
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
375
|
+
!! source digest: sha256:946adae5ac2b94ccb38002a3dbc6b2464a2145f654bcfc818a9ae7aab3ae4ac5
|
|
371
376
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
|
-
<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/
|
|
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/16.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-16-0/l10n-brazil-16-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=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
378
|
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/l10n-brazil/16.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" /></p>
|
|
374
379
|
<div class="section" id="classificacoes-fiscais">
|
|
375
|
-
<
|
|
380
|
+
<h2>Classificações fiscais</h2>
|
|
376
381
|
<p>Primeramente, este módulo traz uma variedade de cadastros fiscais para
|
|
377
382
|
produtos, parceiros ou empresas. Na hora de emitir documentos fiscais
|
|
378
383
|
como NF-e, NFS-e etc… até empresas do regime simplificado ou MEI
|
|
@@ -396,7 +401,7 @@ precisam deles para calcular os impostos ou emitir documentos fiscais.</p>
|
|
|
396
401
|
</ul>
|
|
397
402
|
</div>
|
|
398
403
|
<div class="section" id="conceito-de-documento-fiscal">
|
|
399
|
-
<
|
|
404
|
+
<h2>Conceito de documento fiscal</h2>
|
|
400
405
|
<p>O Odoo nativo não tem o conceito de documento fiscal. O conceito mais
|
|
401
406
|
parecido seria o <tt class="docutils literal">account.move</tt> e até a versão 10.0 a localização
|
|
402
407
|
estendia o invoice para suportar as NF-e e NFS-e apenas. Naquela época
|
|
@@ -488,7 +493,7 @@ objetos <tt class="docutils literal">account_move</tt> e <tt class="docutils lit
|
|
|
488
493
|
do modulo <tt class="docutils literal">l10n_br_account</tt>.</p>
|
|
489
494
|
</div>
|
|
490
495
|
<div class="section" id="impostos-brasileiros">
|
|
491
|
-
<
|
|
496
|
+
<h2>Impostos brasileiros</h2>
|
|
492
497
|
<p>O módulo l10n_br_fiscal lida com os principais impostos brasileiros
|
|
493
498
|
como:</p>
|
|
494
499
|
<ul class="simple">
|
|
@@ -536,7 +541,7 @@ desses modelos para realizar as operações com ST (Substituição
|
|
|
536
541
|
Tributária)…</p>
|
|
537
542
|
</div>
|
|
538
543
|
<div class="section" id="operacoes-fiscais">
|
|
539
|
-
<
|
|
544
|
+
<h2>Operações fiscais</h2>
|
|
540
545
|
<blockquote>
|
|
541
546
|
<img alt="image3" src="https://raw.githubusercontent.com/OCA/l10n-brazil/16.0/l10n_br_fiscal/static/img/fiscal_operation.png" /></blockquote>
|
|
542
547
|
<p>No Odoo nativo, o conceito mais parecido com a operação fiscal e o
|
|
@@ -568,7 +573,7 @@ Odoo e essa operação fiscal.</p>
|
|
|
568
573
|
</ul>
|
|
569
574
|
</div>
|
|
570
575
|
<div class="section" id="installation">
|
|
571
|
-
<
|
|
576
|
+
<h3><a class="toc-backref" href="#toc-entry-1">Installation</a></h3>
|
|
572
577
|
<p>Para instalar o módulo l10n_br_fiscal, você precisa de instalar primeiro
|
|
573
578
|
os pacotes Python</p>
|
|
574
579
|
<ul class="simple">
|
|
@@ -577,7 +582,7 @@ os pacotes Python</p>
|
|
|
577
582
|
</ul>
|
|
578
583
|
</div>
|
|
579
584
|
<div class="section" id="configuration">
|
|
580
|
-
<
|
|
585
|
+
<h3><a class="toc-backref" href="#toc-entry-2">Configuration</a></h3>
|
|
581
586
|
<p>Para uma boa configuração fiscal, você tem que revisar bem:</p>
|
|
582
587
|
<ul class="simple">
|
|
583
588
|
<li>em Configurações: as operaçoes fiscais que você vai usar, as linhas de
|
|
@@ -588,20 +593,20 @@ produtos (aba fiscal).</li>
|
|
|
588
593
|
</ul>
|
|
589
594
|
</div>
|
|
590
595
|
<div class="section" id="usage">
|
|
591
|
-
<
|
|
596
|
+
<h3><a class="toc-backref" href="#toc-entry-3">Usage</a></h3>
|
|
592
597
|
<p>Você pode criar documentos fiscais direitamente pelo menu fiscal, mas a
|
|
593
598
|
princípio você vai pilotar a criação de documentos fiscais a partir dos
|
|
594
599
|
invoices Odoo, usando módulos adicionais como l10n_br_account,
|
|
595
600
|
l10n_br_sale, l10n_br_purchase…</p>
|
|
596
601
|
</div>
|
|
597
602
|
<div class="section" id="known-issues-roadmap">
|
|
598
|
-
<
|
|
603
|
+
<h3><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h3>
|
|
599
604
|
</div>
|
|
600
605
|
<div class="section" id="changelog">
|
|
601
|
-
<
|
|
606
|
+
<h3><a class="toc-backref" href="#toc-entry-5">Changelog</a></h3>
|
|
602
607
|
</div>
|
|
603
608
|
<div class="section" id="bug-tracker">
|
|
604
|
-
<
|
|
609
|
+
<h3><a class="toc-backref" href="#toc-entry-6">Bug Tracker</a></h3>
|
|
605
610
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-brazil/issues">GitHub Issues</a>.
|
|
606
611
|
In case of trouble, please check there if your issue has already been reported.
|
|
607
612
|
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
|
@@ -609,17 +614,17 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
609
614
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
|
610
615
|
</div>
|
|
611
616
|
<div class="section" id="credits">
|
|
612
|
-
<
|
|
617
|
+
<h3><a class="toc-backref" href="#toc-entry-7">Credits</a></h3>
|
|
613
618
|
</div>
|
|
614
619
|
</div>
|
|
615
620
|
<div class="section" id="authors">
|
|
616
|
-
<
|
|
621
|
+
<h2>Authors</h2>
|
|
617
622
|
<ul class="simple">
|
|
618
623
|
<li>Akretion</li>
|
|
619
624
|
</ul>
|
|
620
625
|
</div>
|
|
621
626
|
<div class="section" id="contributors">
|
|
622
|
-
<
|
|
627
|
+
<h2>Contributors</h2>
|
|
623
628
|
<ul class="simple">
|
|
624
629
|
<li><a class="reference external" href="https://www.akretion.com/pt-BR">Akretion</a>:<ul>
|
|
625
630
|
<li>Renato Lima <<a class="reference external" href="mailto:renato.lima@akretion.com.br">renato.lima@akretion.com.br</a>></li>
|
|
@@ -644,7 +649,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
644
649
|
</ul>
|
|
645
650
|
</div>
|
|
646
651
|
<div class="section" id="maintainers">
|
|
647
|
-
<
|
|
652
|
+
<h2>Maintainers</h2>
|
|
648
653
|
<p>This module is maintained by the OCA.</p>
|
|
649
654
|
<a class="reference external image-reference" href="https://odoo-community.org">
|
|
650
655
|
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
|
@@ -652,11 +657,12 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|
|
652
657
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|
653
658
|
mission is to support the collaborative development of Odoo features and
|
|
654
659
|
promote its widespread use.</p>
|
|
655
|
-
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">
|
|
656
|
-
<p><a class="reference external image-reference" href="https://github.com/renatonlima"><img alt="renatonlima" src="https://github.com/renatonlima.png?size=40px" /></a></p>
|
|
660
|
+
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
|
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>
|
|
657
662
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-brazil/tree/16.0/l10n_br_fiscal">OCA/l10n-brazil</a> project on GitHub.</p>
|
|
658
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>
|
|
659
664
|
</div>
|
|
660
665
|
</div>
|
|
666
|
+
</div>
|
|
661
667
|
</body>
|
|
662
668
|
</html>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** @odoo-module **/
|
|
2
|
+
// Copyright 2025-TODAY Akretion - Raphael Valyi <raphael.valyi@akretion.com>
|
|
3
|
+
// License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
|
|
4
|
+
|
|
5
|
+
/* eslint-disable sort-imports */
|
|
6
|
+
|
|
7
|
+
import {onWillStart} from "@odoo/owl";
|
|
8
|
+
import {patch} from "@web/core/utils/patch";
|
|
9
|
+
import {ListRenderer} from "@web/views/list/list_renderer";
|
|
10
|
+
import {ViewButton} from "@web/views/view_button/view_button";
|
|
11
|
+
|
|
12
|
+
patch(ViewButton.prototype, "l10n_br_fiscal.ViewButton", {
|
|
13
|
+
onClick() {
|
|
14
|
+
if (this.props.className && this.props.className.includes("edit-line-popup")) {
|
|
15
|
+
if (this.props.record) {
|
|
16
|
+
this.env.bus.trigger("OPEN_LINE_IN_POPUP", {
|
|
17
|
+
record: this.props.record,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
this._super.apply(this, arguments);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
patch(ListRenderer.prototype, "l10n_br_fiscal.ListRenderer", {
|
|
27
|
+
setup() {
|
|
28
|
+
this._super.apply(this, arguments);
|
|
29
|
+
|
|
30
|
+
onWillStart(() => {
|
|
31
|
+
this.env.bus.on("OPEN_LINE_IN_POPUP", this, ({record}) => {
|
|
32
|
+
if (this.props.list.records.includes(record)) {
|
|
33
|
+
this.props.openRecord(record);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -2,17 +2,18 @@
|
|
|
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,
|
|
9
|
+
test_tax_classification,
|
|
8
10
|
test_tax_benefit,
|
|
11
|
+
test_document_edition,
|
|
9
12
|
test_ibpt_product,
|
|
10
13
|
test_ibpt_service,
|
|
11
14
|
test_icms_regulation,
|
|
12
15
|
test_ncm,
|
|
13
16
|
test_partner_profile,
|
|
14
17
|
test_service_type,
|
|
15
|
-
test_subsequent_operation,
|
|
16
|
-
test_uom_uom,
|
|
17
18
|
test_operation,
|
|
18
19
|
)
|