odoo-addon-l10n-br-fiscal 18.0.2.0.0.10__py3-none-any.whl → 18.0.7.1.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.
Potentially problematic release.
This version of odoo-addon-l10n-br-fiscal might be problematic. Click here for more details.
- odoo/addons/l10n_br_fiscal/README.rst +1 -1
- odoo/addons/l10n_br_fiscal/__manifest__.py +7 -3
- 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.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.operation.indicator.csv +27 -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 +31 -0
- odoo/addons/l10n_br_fiscal/data/l10n_br_fiscal.tax.group.csv +3 -0
- odoo/addons/l10n_br_fiscal/data/operation_data.xml +1 -1
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_demo.xml +3 -179
- odoo/addons/l10n_br_fiscal/demo/fiscal_document_nfse_demo.xml +0 -4
- odoo/addons/l10n_br_fiscal/demo/fiscal_operation_demo.xml +2 -2
- odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +665 -79
- odoo/addons/l10n_br_fiscal/i18n/pt_BR.po +713 -102
- odoo/addons/l10n_br_fiscal/migrations/18.0.3.0.0/pre-migration.py +30 -0
- odoo/addons/l10n_br_fiscal/models/__init__.py +2 -2
- odoo/addons/l10n_br_fiscal/models/comment.py +3 -1
- odoo/addons/l10n_br_fiscal/models/data_abstract.py +9 -6
- odoo/addons/l10n_br_fiscal/models/document.py +27 -8
- odoo/addons/l10n_br_fiscal/models/document_line.py +51 -8
- odoo/addons/l10n_br_fiscal/models/document_line_mixin.py +1107 -35
- odoo/addons/l10n_br_fiscal/models/document_mixin.py +244 -6
- odoo/addons/l10n_br_fiscal/models/document_related.py +1 -1
- odoo/addons/l10n_br_fiscal/models/document_serie.py +33 -0
- odoo/addons/l10n_br_fiscal/models/icms_regulation.py +1 -1
- odoo/addons/l10n_br_fiscal/models/operation_dashboard.py +3 -2
- odoo/addons/l10n_br_fiscal/models/operation_indicator.py +58 -0
- odoo/addons/l10n_br_fiscal/models/operation_line.py +28 -0
- odoo/addons/l10n_br_fiscal/models/partner_profile.py +6 -0
- odoo/addons/l10n_br_fiscal/models/product_template.py +4 -0
- odoo/addons/l10n_br_fiscal/models/res_company.py +17 -0
- odoo/addons/l10n_br_fiscal/models/res_partner.py +17 -0
- odoo/addons/l10n_br_fiscal/models/simplified_tax_range.py +8 -0
- odoo/addons/l10n_br_fiscal/models/tax.py +7 -3
- odoo/addons/l10n_br_fiscal/models/tax_classification.py +81 -0
- odoo/addons/l10n_br_fiscal/security/fiscal_security.xml +6 -16
- odoo/addons/l10n_br_fiscal/security/ir.model.access.csv +7 -2
- odoo/addons/l10n_br_fiscal/static/description/index.html +1 -1
- odoo/addons/l10n_br_fiscal/tests/__init__.py +2 -0
- odoo/addons/l10n_br_fiscal/tests/test_document_edition.py +175 -10
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_generic.py +13 -42
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_nfse.py +0 -5
- odoo/addons/l10n_br_fiscal/tests/test_fiscal_document_serie.py +60 -0
- odoo/addons/l10n_br_fiscal/tests/test_tax_benefit.py +2 -5
- odoo/addons/l10n_br_fiscal/tests/test_tax_classification.py +110 -0
- odoo/addons/l10n_br_fiscal/views/document_line_mixin_view.xml +107 -4
- odoo/addons/l10n_br_fiscal/views/document_line_view.xml +7 -3
- odoo/addons/l10n_br_fiscal/views/document_view.xml +34 -15
- odoo/addons/l10n_br_fiscal/views/icms_regulation_view.xml +1 -5
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_action.xml +30 -0
- odoo/addons/l10n_br_fiscal/views/l10n_br_fiscal_menu.xml +16 -9
- odoo/addons/l10n_br_fiscal/views/nbs_view.xml +1 -5
- odoo/addons/l10n_br_fiscal/views/ncm_view.xml +1 -5
- odoo/addons/l10n_br_fiscal/views/operation_dashboard_view.xml +3 -3
- odoo/addons/l10n_br_fiscal/views/operation_indicator_view.xml +75 -0
- odoo/addons/l10n_br_fiscal/views/operation_line_view.xml +4 -5
- odoo/addons/l10n_br_fiscal/views/operation_view.xml +1 -5
- odoo/addons/l10n_br_fiscal/views/product_product_view.xml +33 -6
- odoo/addons/l10n_br_fiscal/views/product_template_view.xml +22 -4
- odoo/addons/l10n_br_fiscal/views/res_company_view.xml +6 -0
- odoo/addons/l10n_br_fiscal/views/res_partner_view.xml +10 -0
- odoo/addons/l10n_br_fiscal/views/service_type_view.xml +1 -5
- odoo/addons/l10n_br_fiscal/views/tax_classification.xml +108 -0
- odoo/addons/l10n_br_fiscal/views/tax_definition_view.xml +1 -5
- odoo/addons/l10n_br_fiscal/views/tax_view.xml +2 -2
- odoo/addons/l10n_br_fiscal/wizards/__init__.py +1 -1
- odoo/addons/l10n_br_fiscal/wizards/base_wizard_mixin.py +1 -1
- odoo/addons/l10n_br_fiscal/wizards/document_import_wizard.py +234 -0
- odoo/addons/l10n_br_fiscal/wizards/{document_import_wizard_mixin.xml → document_import_wizard.xml} +26 -7
- {odoo_addon_l10n_br_fiscal-18.0.2.0.0.10.dist-info → odoo_addon_l10n_br_fiscal-18.0.7.1.0.dist-info}/METADATA +3 -3
- {odoo_addon_l10n_br_fiscal-18.0.2.0.0.10.dist-info → odoo_addon_l10n_br_fiscal-18.0.7.1.0.dist-info}/RECORD +75 -68
- odoo/addons/l10n_br_fiscal/models/document_line_mixin_methods.py +0 -837
- odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py +0 -349
- odoo/addons/l10n_br_fiscal/wizards/document_import_wizard_mixin.py +0 -129
- {odoo_addon_l10n_br_fiscal-18.0.2.0.0.10.dist-info → odoo_addon_l10n_br_fiscal-18.0.7.1.0.dist-info}/WHEEL +0 -0
- {odoo_addon_l10n_br_fiscal-18.0.2.0.0.10.dist-info → odoo_addon_l10n_br_fiscal-18.0.7.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
from odoo.tests import Form, TransactionCase
|
|
2
|
+
from odoo.tests.common import tagged
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@tagged("post_install", "-at_install")
|
|
6
|
+
class TestTaxClassification(TransactionCase):
|
|
7
|
+
@classmethod
|
|
8
|
+
def setUpClass(cls):
|
|
9
|
+
super().setUpClass()
|
|
10
|
+
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
|
11
|
+
|
|
12
|
+
cls.company = cls.env.ref("l10n_br_base.empresa_lucro_presumido")
|
|
13
|
+
cls.partner = cls.env.ref("l10n_br_base.res_partner_cliente1_sp")
|
|
14
|
+
cls.product = cls.env.ref("product.product_product_6")
|
|
15
|
+
|
|
16
|
+
# Use a stable operation line already referenced in existing test suites.
|
|
17
|
+
cls.operation_line = cls.env.ref("l10n_br_fiscal.fo_venda_venda")
|
|
18
|
+
|
|
19
|
+
# Pick classifications with CBS/IBS taxes set in the provided CSV.
|
|
20
|
+
cls.classification_company = cls.env.ref(
|
|
21
|
+
"l10n_br_fiscal.tax_classification_000001"
|
|
22
|
+
)
|
|
23
|
+
cls.classification_line = cls.env.ref(
|
|
24
|
+
"l10n_br_fiscal.tax_classification_200001"
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
def _map_kwargs(self):
|
|
28
|
+
return {
|
|
29
|
+
"company": self.company,
|
|
30
|
+
"partner": self.partner,
|
|
31
|
+
"product": self.product,
|
|
32
|
+
"ncm": self.product.ncm_id,
|
|
33
|
+
"nbm": self.env["l10n_br_fiscal.nbm"],
|
|
34
|
+
"nbs": self.env["l10n_br_fiscal.nbs"],
|
|
35
|
+
"cest": self.env["l10n_br_fiscal.cest"],
|
|
36
|
+
"city_taxation_code": self.env["l10n_br_fiscal.city.taxation.code"],
|
|
37
|
+
"service_type": self.env["l10n_br_fiscal.service.type"],
|
|
38
|
+
"ind_final": "1",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
def test_map_fiscal_taxes_tax_classification_from_company(self):
|
|
42
|
+
"""Operation line must fallback to company tax classification when empty."""
|
|
43
|
+
self.company.tax_classification_id = self.classification_company
|
|
44
|
+
self.operation_line.tax_classification_id = False
|
|
45
|
+
|
|
46
|
+
result = self.operation_line.map_fiscal_taxes(**self._map_kwargs())
|
|
47
|
+
|
|
48
|
+
self.assertEqual(result["tax_classification"], self.classification_company)
|
|
49
|
+
self.assertEqual(
|
|
50
|
+
result["taxes"][self.classification_company.tax_cbs_id.tax_domain],
|
|
51
|
+
self.classification_company.tax_cbs_id,
|
|
52
|
+
)
|
|
53
|
+
self.assertEqual(
|
|
54
|
+
result["taxes"][self.classification_company.tax_ibs_id.tax_domain],
|
|
55
|
+
self.classification_company.tax_ibs_id,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
def test_map_fiscal_taxes_tax_classification_from_operation_line(self):
|
|
59
|
+
"""Operation line tax classification must override company default."""
|
|
60
|
+
self.company.tax_classification_id = self.classification_company
|
|
61
|
+
self.operation_line.tax_classification_id = self.classification_line
|
|
62
|
+
|
|
63
|
+
result = self.operation_line.map_fiscal_taxes(**self._map_kwargs())
|
|
64
|
+
|
|
65
|
+
self.assertEqual(result["tax_classification"], self.classification_line)
|
|
66
|
+
self.assertEqual(
|
|
67
|
+
result["taxes"][self.classification_line.tax_cbs_id.tax_domain],
|
|
68
|
+
self.classification_line.tax_cbs_id,
|
|
69
|
+
)
|
|
70
|
+
self.assertEqual(
|
|
71
|
+
result["taxes"][self.classification_line.tax_ibs_id.tax_domain],
|
|
72
|
+
self.classification_line.tax_ibs_id,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def test_document_line_receives_cbs_ibs_from_tax_classification(self):
|
|
76
|
+
"""Fiscal document line must receive tax classification and CBS/IBS taxes."""
|
|
77
|
+
self.company.tax_classification_id = self.classification_company
|
|
78
|
+
self.operation_line.tax_classification_id = False
|
|
79
|
+
|
|
80
|
+
doc_form = Form(
|
|
81
|
+
self.env["l10n_br_fiscal.document"].with_context(
|
|
82
|
+
default_fiscal_operation_type="out",
|
|
83
|
+
default_company_id=self.company.id,
|
|
84
|
+
)
|
|
85
|
+
)
|
|
86
|
+
doc_form.partner_id = self.partner
|
|
87
|
+
doc_form.fiscal_operation_id = self.env.ref("l10n_br_fiscal.fo_venda")
|
|
88
|
+
doc_form.ind_final = "1"
|
|
89
|
+
|
|
90
|
+
with doc_form.fiscal_line_ids.new() as line_form:
|
|
91
|
+
line_form.product_id = self.product
|
|
92
|
+
# Ensure we map on a predictable operation line for this assertion.
|
|
93
|
+
line_form.fiscal_operation_line_id = self.operation_line
|
|
94
|
+
|
|
95
|
+
self.assertEqual(
|
|
96
|
+
line_form.tax_classification_id, self.classification_company
|
|
97
|
+
)
|
|
98
|
+
self.assertEqual(
|
|
99
|
+
line_form.cbs_tax_id, self.classification_company.tax_cbs_id
|
|
100
|
+
)
|
|
101
|
+
self.assertEqual(
|
|
102
|
+
line_form.ibs_tax_id, self.classification_company.tax_ibs_id
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
self.assertIn(
|
|
106
|
+
self.classification_company.tax_cbs_id, line_form.fiscal_tax_ids
|
|
107
|
+
)
|
|
108
|
+
self.assertIn(
|
|
109
|
+
self.classification_company.tax_ibs_id, line_form.fiscal_tax_ids
|
|
110
|
+
)
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
<field name="service_type_id" force_save="1" invisible="1" />
|
|
38
38
|
<field name="city_taxation_code_id" force_save="1" invisible="1" />
|
|
39
39
|
<field name="uot_id" force_save="1" invisible="1" />
|
|
40
|
+
<field name="uom_id" force_save="1" invisible="1" />
|
|
40
41
|
<field name="fiscal_price" force_save="1" invisible="1" />
|
|
41
42
|
<field name="fiscal_quantity" force_save="1" invisible="1" />
|
|
42
43
|
<field
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
readonly="1"
|
|
47
48
|
/>
|
|
48
49
|
<field name="allow_csll_irpj" force_save="1" invisible="1" />
|
|
50
|
+
<field name="cst_code_prefix_like" force_save="1" invisible="1" />
|
|
49
51
|
</group>
|
|
50
52
|
<notebook>
|
|
51
53
|
<field name="product_id" force_save="1" invisible="1" />
|
|
@@ -60,6 +62,107 @@
|
|
|
60
62
|
/>
|
|
61
63
|
</group>
|
|
62
64
|
<notebook>
|
|
65
|
+
<page name="cbs/ibs" string="CBS/IBS">
|
|
66
|
+
<group string="Tax Classification">
|
|
67
|
+
<field
|
|
68
|
+
name="tax_classification_id"
|
|
69
|
+
force_save="1"
|
|
70
|
+
options="{'no_create': True, 'no_create_edit': True}"
|
|
71
|
+
/>
|
|
72
|
+
</group>
|
|
73
|
+
<group string="CBS">
|
|
74
|
+
<group>
|
|
75
|
+
<field
|
|
76
|
+
name="cbs_tax_id"
|
|
77
|
+
options="{'no_create': True, 'no_create_edit': True}"
|
|
78
|
+
/>
|
|
79
|
+
<field
|
|
80
|
+
name="cbs_cst_id"
|
|
81
|
+
force_save="1"
|
|
82
|
+
readonly="cbs_tax_id != False"
|
|
83
|
+
options="{'no_create': True, 'no_create_edit': True}"
|
|
84
|
+
/>
|
|
85
|
+
<field
|
|
86
|
+
name="cbs_cst_code"
|
|
87
|
+
readonly="1"
|
|
88
|
+
invisible="1"
|
|
89
|
+
/>
|
|
90
|
+
<field
|
|
91
|
+
name="cbs_base_type"
|
|
92
|
+
force_save="1"
|
|
93
|
+
readonly="cbs_tax_id != False"
|
|
94
|
+
/>
|
|
95
|
+
</group>
|
|
96
|
+
<group>
|
|
97
|
+
<field
|
|
98
|
+
name="cbs_base"
|
|
99
|
+
force_save="1"
|
|
100
|
+
readonly="cbs_tax_id != False"
|
|
101
|
+
/>
|
|
102
|
+
<field
|
|
103
|
+
name="cbs_percent"
|
|
104
|
+
force_save="1"
|
|
105
|
+
readonly="cbs_tax_id != False"
|
|
106
|
+
/>
|
|
107
|
+
<field
|
|
108
|
+
name="cbs_reduction"
|
|
109
|
+
force_save="1"
|
|
110
|
+
readonly="cbs_tax_id != False"
|
|
111
|
+
/>
|
|
112
|
+
<field
|
|
113
|
+
name="cbs_value"
|
|
114
|
+
force_save="1"
|
|
115
|
+
readonly="cbs_tax_id != False"
|
|
116
|
+
/>
|
|
117
|
+
</group>
|
|
118
|
+
</group>
|
|
119
|
+
<group string="IBS">
|
|
120
|
+
<group>
|
|
121
|
+
<field
|
|
122
|
+
name="ibs_tax_id"
|
|
123
|
+
options="{'no_create': True, 'no_create_edit': True}"
|
|
124
|
+
/>
|
|
125
|
+
<field
|
|
126
|
+
name="ibs_cst_id"
|
|
127
|
+
force_save="1"
|
|
128
|
+
readonly="ibs_tax_id != False"
|
|
129
|
+
options="{'no_create': True, 'no_create_edit': True}"
|
|
130
|
+
/>
|
|
131
|
+
<field
|
|
132
|
+
name="ibs_cst_code"
|
|
133
|
+
readonly="1"
|
|
134
|
+
invisible="1"
|
|
135
|
+
/>
|
|
136
|
+
<field
|
|
137
|
+
name="ibs_base_type"
|
|
138
|
+
force_save="1"
|
|
139
|
+
readonly="ibs_tax_id != False"
|
|
140
|
+
/>
|
|
141
|
+
</group>
|
|
142
|
+
<group>
|
|
143
|
+
<field
|
|
144
|
+
name="ibs_base"
|
|
145
|
+
force_save="1"
|
|
146
|
+
readonly="ibs_tax_id != False"
|
|
147
|
+
/>
|
|
148
|
+
<field
|
|
149
|
+
name="ibs_percent"
|
|
150
|
+
force_save="1"
|
|
151
|
+
readonly="ibs_tax_id != False"
|
|
152
|
+
/>
|
|
153
|
+
<field
|
|
154
|
+
name="ibs_reduction"
|
|
155
|
+
force_save="1"
|
|
156
|
+
readonly="ibs_tax_id != False"
|
|
157
|
+
/>
|
|
158
|
+
<field
|
|
159
|
+
name="ibs_value"
|
|
160
|
+
force_save="1"
|
|
161
|
+
readonly="ibs_tax_id != False"
|
|
162
|
+
/>
|
|
163
|
+
</group>
|
|
164
|
+
</group>
|
|
165
|
+
</page>
|
|
63
166
|
<page
|
|
64
167
|
name="issqn"
|
|
65
168
|
string="ISSQN"
|
|
@@ -467,22 +570,22 @@
|
|
|
467
570
|
<field
|
|
468
571
|
name="icms_effective_reduction"
|
|
469
572
|
force_save="1"
|
|
470
|
-
|
|
573
|
+
invisible="icms_cst_code != '500'"
|
|
471
574
|
/>
|
|
472
575
|
<field
|
|
473
576
|
name="icms_effective_base"
|
|
474
577
|
force_save="1"
|
|
475
|
-
|
|
578
|
+
invisible="icms_cst_code != '500'"
|
|
476
579
|
/>
|
|
477
580
|
<field
|
|
478
581
|
name="icms_effective_percent"
|
|
479
582
|
force_save="1"
|
|
480
|
-
|
|
583
|
+
invisible="icms_cst_code != '500'"
|
|
481
584
|
/>
|
|
482
585
|
<field
|
|
483
586
|
name="icms_effective_value"
|
|
484
587
|
force_save="1"
|
|
485
|
-
|
|
588
|
+
invisible="icms_cst_code != '500'"
|
|
486
589
|
/>
|
|
487
590
|
</group>
|
|
488
591
|
</group>
|
|
@@ -82,6 +82,10 @@
|
|
|
82
82
|
name="cnae_id"
|
|
83
83
|
invisible="fiscal_genre_code != '00' and cfop_id"
|
|
84
84
|
/>
|
|
85
|
+
<field
|
|
86
|
+
name="operation_indicator_id"
|
|
87
|
+
invisible="fiscal_genre_code != '00' and cfop_id != False"
|
|
88
|
+
/>
|
|
85
89
|
</group>
|
|
86
90
|
<group name="l10n_br_fiscal" string="Operation">
|
|
87
91
|
<field
|
|
@@ -102,13 +106,13 @@
|
|
|
102
106
|
<page name="amounts" string="Amounts">
|
|
103
107
|
<group>
|
|
104
108
|
<group>
|
|
105
|
-
<field name="
|
|
109
|
+
<field name="fiscal_amount_untaxed" />
|
|
106
110
|
<field name="amount_fiscal" />
|
|
107
|
-
<field name="
|
|
111
|
+
<field name="fiscal_amount_tax" />
|
|
108
112
|
<field name="estimate_tax" />
|
|
109
113
|
</group>
|
|
110
114
|
<group>
|
|
111
|
-
<field name="
|
|
115
|
+
<field name="fiscal_amount_total" />
|
|
112
116
|
<field name="amount_tax_withholding" />
|
|
113
117
|
<field name="amount_taxed" />
|
|
114
118
|
</group>
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
<field name="document_date" />
|
|
72
72
|
<field name="fiscal_operation_id" />
|
|
73
73
|
<field name="partner_id" />
|
|
74
|
-
<field name="
|
|
75
|
-
<field name="
|
|
76
|
-
<field name="
|
|
74
|
+
<field name="fiscal_amount_untaxed" />
|
|
75
|
+
<field name="fiscal_amount_tax" />
|
|
76
|
+
<field name="fiscal_amount_total" />
|
|
77
77
|
<field name="state" column_invisible="True" />
|
|
78
78
|
<field
|
|
79
79
|
name="state_edoc"
|
|
@@ -234,7 +234,10 @@
|
|
|
234
234
|
/>
|
|
235
235
|
<field name="partner_shipping_id" />
|
|
236
236
|
</group>
|
|
237
|
-
<group
|
|
237
|
+
<group
|
|
238
|
+
name="l10n_br_fiscal"
|
|
239
|
+
invisible="document_type in ('57', '08', '09', '10', '11', '26', '67', '8B')"
|
|
240
|
+
>
|
|
238
241
|
<field
|
|
239
242
|
name="fiscal_operation_id"
|
|
240
243
|
options="{'no_create': True, 'no_create_edit': True}"
|
|
@@ -292,22 +295,25 @@
|
|
|
292
295
|
/>
|
|
293
296
|
<field name="company_id" invisible="1" />
|
|
294
297
|
</group>
|
|
295
|
-
<group
|
|
296
|
-
name="CT-e Info"
|
|
297
|
-
invisible="[('document_type_id.code', 'in', ['57', '08', '09', '10', '11', '26', '67', '8B'])]"
|
|
298
|
-
>
|
|
299
|
-
<field name="transport_modal" />
|
|
300
|
-
<field name="service_provider" />
|
|
301
|
-
</group>
|
|
302
298
|
</group>
|
|
303
299
|
<notebook>
|
|
304
300
|
<page name="products" string="Products and Services">
|
|
305
301
|
<field
|
|
306
302
|
name="fiscal_line_ids"
|
|
307
|
-
context="{
|
|
303
|
+
context="{
|
|
304
|
+
'form_view_ref': 'l10n_br_fiscal.document_line_form',
|
|
305
|
+
'default_document_id': id,
|
|
306
|
+
'default_company_id': company_id,
|
|
307
|
+
'default_partner_id': partner_id,
|
|
308
|
+
'default_fiscal_operation_type': fiscal_operation_type,
|
|
309
|
+
'default_fiscal_operation_id': fiscal_operation_id,
|
|
310
|
+
'default_ind_final': ind_final,
|
|
311
|
+
'no_subcall': True,
|
|
312
|
+
}"
|
|
308
313
|
>
|
|
309
314
|
<list>
|
|
310
315
|
<field name="product_id" />
|
|
316
|
+
<field name="name" />
|
|
311
317
|
<field name="uom_id" />
|
|
312
318
|
<field name="price_unit" />
|
|
313
319
|
<field name="quantity" />
|
|
@@ -315,7 +321,7 @@
|
|
|
315
321
|
name="fiscal_tax_ids"
|
|
316
322
|
widget="many2many_tags"
|
|
317
323
|
/>
|
|
318
|
-
<field name="
|
|
324
|
+
<field name="fiscal_amount_total" sum="Total" />
|
|
319
325
|
</list>
|
|
320
326
|
</field>
|
|
321
327
|
</page>
|
|
@@ -332,6 +338,14 @@
|
|
|
332
338
|
<page name="amounts" string="Amounts">
|
|
333
339
|
<group>
|
|
334
340
|
<group>
|
|
341
|
+
<group string="IBS">
|
|
342
|
+
<field name="amount_ibs_base" />
|
|
343
|
+
<field name="amount_ibs_value" />
|
|
344
|
+
</group>
|
|
345
|
+
<group string="CBS">
|
|
346
|
+
<field name="amount_cbs_base" />
|
|
347
|
+
<field name="amount_cbs_value" />
|
|
348
|
+
</group>
|
|
335
349
|
<group string="ICMS">
|
|
336
350
|
<field name="amount_icms_base" />
|
|
337
351
|
<field name="amount_icms_value" />
|
|
@@ -346,6 +360,11 @@
|
|
|
346
360
|
<field name="amount_icmsst_base" />
|
|
347
361
|
<field name="amount_icmsst_value" />
|
|
348
362
|
</group>
|
|
363
|
+
<group string="II">
|
|
364
|
+
<field name="amount_ii_base" />
|
|
365
|
+
<field name="amount_ii_value" />
|
|
366
|
+
<field name="amount_ii_customhouse_charges" />
|
|
367
|
+
</group>
|
|
349
368
|
<group string="IPI">
|
|
350
369
|
<field name="amount_ipi_base" />
|
|
351
370
|
<field name="amount_ipi_value" />
|
|
@@ -413,8 +432,8 @@
|
|
|
413
432
|
readonly="delivery_costs == 'line' and not force_compute_delivery_costs_by_total"
|
|
414
433
|
/>
|
|
415
434
|
<field name="amount_estimate_tax" />
|
|
416
|
-
<field name="
|
|
417
|
-
<field name="
|
|
435
|
+
<field name="fiscal_amount_tax" />
|
|
436
|
+
<field name="fiscal_amount_total" />
|
|
418
437
|
<field name="amount_tax_withholding" />
|
|
419
438
|
<field name="amount_financial_total" />
|
|
420
439
|
<field name="amount_financial_total_gross" />
|
|
@@ -32,11 +32,7 @@
|
|
|
32
32
|
</group>
|
|
33
33
|
<notebook />
|
|
34
34
|
</sheet>
|
|
35
|
-
<
|
|
36
|
-
<field name="message_follower_ids" groups="base.group_user" />
|
|
37
|
-
<field name="activity_ids" />
|
|
38
|
-
<field name="message_ids" />
|
|
39
|
-
</div>
|
|
35
|
+
<chatter />
|
|
40
36
|
</form>
|
|
41
37
|
</field>
|
|
42
38
|
</record>
|
|
@@ -311,6 +311,20 @@
|
|
|
311
311
|
>All Serie for Documents supported by Brazilian Fiscal modulo for Odoo.</p>
|
|
312
312
|
</field>
|
|
313
313
|
</record>
|
|
314
|
+
<!-- Tax Classification -->
|
|
315
|
+
|
|
316
|
+
<record id="tax_classification_action" model="ir.actions.act_window">
|
|
317
|
+
<field name="name">Tax Classification</field>
|
|
318
|
+
<field name="type">ir.actions.act_window</field>
|
|
319
|
+
<field name="res_model">l10n_br_fiscal.tax.classification</field>
|
|
320
|
+
<field name="view_mode">tree,form</field>
|
|
321
|
+
<field name="view_id" ref="tax_classification_tree" />
|
|
322
|
+
<field name="help" type="html">
|
|
323
|
+
<p class="o_view_nocontent_smiling_face">Add a new Tax Classification</p>
|
|
324
|
+
<p
|
|
325
|
+
>A Tax Classification is necessary to create fiscal operations for your fiscal moves.</p>
|
|
326
|
+
</field>
|
|
327
|
+
</record>
|
|
314
328
|
<!-- Simplified Tax -->
|
|
315
329
|
|
|
316
330
|
<record id="simplified_tax_action" model="ir.actions.act_window">
|
|
@@ -539,4 +553,20 @@
|
|
|
539
553
|
<field name="res_model">l10n_br_fiscal.city.taxation.code</field>
|
|
540
554
|
<field name="view_mode">list,form</field>
|
|
541
555
|
</record>
|
|
556
|
+
<!-- Operation Indicator -->
|
|
557
|
+
|
|
558
|
+
<record id="operation_indicator_action" model="ir.actions.act_window">
|
|
559
|
+
<field name="name">Operation Indicator</field>
|
|
560
|
+
<field name="res_model">l10n_br_fiscal.operation.indicator</field>
|
|
561
|
+
<field name="view_mode">tree,form</field>
|
|
562
|
+
<field name="help" type="html">
|
|
563
|
+
<p class="o_view_nocontent_smiling_face">
|
|
564
|
+
Create an Operation Indicator record
|
|
565
|
+
</p>
|
|
566
|
+
<p>
|
|
567
|
+
Operation Indicators are used to categorize consumption
|
|
568
|
+
operations.
|
|
569
|
+
</p>
|
|
570
|
+
</field>
|
|
571
|
+
</record>
|
|
542
572
|
</odoo>
|
|
@@ -75,15 +75,6 @@
|
|
|
75
75
|
parent="document_sub_menu"
|
|
76
76
|
sequence="20"
|
|
77
77
|
/>
|
|
78
|
-
<!-- All Documents -->
|
|
79
|
-
<menuitem
|
|
80
|
-
id="document_all_menu"
|
|
81
|
-
action="document_all_action"
|
|
82
|
-
name="All low level Documents"
|
|
83
|
-
groups="l10n_br_fiscal.group_user,l10n_br_fiscal.group_manager"
|
|
84
|
-
parent="document_sub_menu"
|
|
85
|
-
sequence="30"
|
|
86
|
-
/>
|
|
87
78
|
<!-- Partners -->
|
|
88
79
|
<menuitem
|
|
89
80
|
id="partners_menu"
|
|
@@ -338,6 +329,22 @@
|
|
|
338
329
|
parent="taxes_config_menu"
|
|
339
330
|
sequence="30"
|
|
340
331
|
/>
|
|
332
|
+
<!-- Tax Classification -->
|
|
333
|
+
<menuitem
|
|
334
|
+
id="tax_classification_menu"
|
|
335
|
+
action="tax_classification_action"
|
|
336
|
+
groups="l10n_br_fiscal.group_manager"
|
|
337
|
+
parent="taxes_config_menu"
|
|
338
|
+
sequence="30"
|
|
339
|
+
/>
|
|
340
|
+
<!-- Operation Indicator -->
|
|
341
|
+
<menuitem
|
|
342
|
+
id="operation_indicator_menu"
|
|
343
|
+
action="operation_indicator_action"
|
|
344
|
+
groups="l10n_br_fiscal.group_manager"
|
|
345
|
+
parent="taxes_config_menu"
|
|
346
|
+
sequence="30"
|
|
347
|
+
/>
|
|
341
348
|
<!-- Tax ICMS Settings -->
|
|
342
349
|
<menuitem
|
|
343
350
|
id="tax_icms_config_menu"
|
|
@@ -110,11 +110,7 @@
|
|
|
110
110
|
</page>
|
|
111
111
|
</notebook>
|
|
112
112
|
</sheet>
|
|
113
|
-
<
|
|
114
|
-
<field name="message_follower_ids" groups="base.group_user" />
|
|
115
|
-
<field name="activity_ids" />
|
|
116
|
-
<field name="message_ids" />
|
|
117
|
-
</div>
|
|
113
|
+
<chatter />
|
|
118
114
|
</form>
|
|
119
115
|
</field>
|
|
120
116
|
</record>
|
|
@@ -160,11 +160,7 @@
|
|
|
160
160
|
</page>
|
|
161
161
|
</notebook>
|
|
162
162
|
</sheet>
|
|
163
|
-
<
|
|
164
|
-
<field name="message_follower_ids" groups="base.group_user" />
|
|
165
|
-
<field name="activity_ids" />
|
|
166
|
-
<field name="message_ids" />
|
|
167
|
-
</div>
|
|
163
|
+
<chatter />
|
|
168
164
|
</form>
|
|
169
165
|
</field>
|
|
170
166
|
</record>
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
<span title="A enviar">
|
|
87
87
|
<t
|
|
88
88
|
t-esc="dashboard.number_2confirm"
|
|
89
|
-
/>A enviar</span>
|
|
89
|
+
/> A enviar</span>
|
|
90
90
|
</a>
|
|
91
91
|
</div>
|
|
92
92
|
</div>
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
>
|
|
101
101
|
<t
|
|
102
102
|
t-esc="dashboard.number_authorized"
|
|
103
|
-
/>Autorizados</a>
|
|
103
|
+
/> Autorizados</a>
|
|
104
104
|
</div>
|
|
105
105
|
</div>
|
|
106
106
|
<div class="row">
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
<span title="Cancelados">
|
|
114
114
|
<t
|
|
115
115
|
t-esc="dashboard.number_cancelled"
|
|
116
|
-
/>Cancelados</span>
|
|
116
|
+
/> Cancelados</span>
|
|
117
117
|
</a>
|
|
118
118
|
</div>
|
|
119
119
|
</div>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
+
<odoo>
|
|
3
|
+
<record id="operation_indicator_tree" model="ir.ui.view">
|
|
4
|
+
<field name="name">l10n_br_fiscal.operation.indicator.tree</field>
|
|
5
|
+
<field name="model">l10n_br_fiscal.operation.indicator</field>
|
|
6
|
+
<field name="arch" type="xml">
|
|
7
|
+
<list>
|
|
8
|
+
<field name="code" />
|
|
9
|
+
<field name="name" />
|
|
10
|
+
<field name="supply_location" />
|
|
11
|
+
<field name="active" column_invisible="True" />
|
|
12
|
+
</list>
|
|
13
|
+
</field>
|
|
14
|
+
</record>
|
|
15
|
+
|
|
16
|
+
<record id="operation_indicator_form" model="ir.ui.view">
|
|
17
|
+
<field name="name">l10n_br_fiscal.operation.indicator.form</field>
|
|
18
|
+
<field name="model">l10n_br_fiscal.operation.indicator</field>
|
|
19
|
+
<field name="arch" type="xml">
|
|
20
|
+
<form string="Operation Indicator">
|
|
21
|
+
<sheet>
|
|
22
|
+
<group>
|
|
23
|
+
<group>
|
|
24
|
+
<field name="code" />
|
|
25
|
+
<field name="name" />
|
|
26
|
+
</group>
|
|
27
|
+
</group>
|
|
28
|
+
<notebook>
|
|
29
|
+
<page string="Operation Details">
|
|
30
|
+
<group>
|
|
31
|
+
<field
|
|
32
|
+
name="operation_type"
|
|
33
|
+
placeholder="Type of operation"
|
|
34
|
+
/>
|
|
35
|
+
<field
|
|
36
|
+
name="operation_location"
|
|
37
|
+
placeholder="Where the operation is considered"
|
|
38
|
+
/>
|
|
39
|
+
</group>
|
|
40
|
+
</page>
|
|
41
|
+
<page string="Supply Information">
|
|
42
|
+
<group>
|
|
43
|
+
<field
|
|
44
|
+
name="supply_characteristic"
|
|
45
|
+
placeholder="Supply characteristic"
|
|
46
|
+
/>
|
|
47
|
+
<field
|
|
48
|
+
name="supply_location"
|
|
49
|
+
placeholder="Place of supply"
|
|
50
|
+
/>
|
|
51
|
+
</group>
|
|
52
|
+
</page>
|
|
53
|
+
</notebook>
|
|
54
|
+
</sheet>
|
|
55
|
+
</form>
|
|
56
|
+
</field>
|
|
57
|
+
</record>
|
|
58
|
+
|
|
59
|
+
<record id="operation_indicator_search" model="ir.ui.view">
|
|
60
|
+
<field name="name">l10n_br_fiscal.operation.indicator.search</field>
|
|
61
|
+
<field name="model">l10n_br_fiscal.operation.indicator</field>
|
|
62
|
+
<field name="arch" type="xml">
|
|
63
|
+
<search string="Operation Indicator">
|
|
64
|
+
<field name="code" />
|
|
65
|
+
<field name="name" />
|
|
66
|
+
<field name="supply_location" />
|
|
67
|
+
<filter
|
|
68
|
+
string="Archived"
|
|
69
|
+
name="inactive"
|
|
70
|
+
domain="[('active', '=', False)]"
|
|
71
|
+
/>
|
|
72
|
+
</search>
|
|
73
|
+
</field>
|
|
74
|
+
</record>
|
|
75
|
+
</odoo>
|
|
@@ -56,6 +56,9 @@
|
|
|
56
56
|
<field name="document_type_id" />
|
|
57
57
|
<field name="add_to_amount" />
|
|
58
58
|
</group>
|
|
59
|
+
<group name="general_tax_classification">
|
|
60
|
+
<field name="tax_classification_id" />
|
|
61
|
+
</group>
|
|
59
62
|
<group
|
|
60
63
|
name="general_cfop"
|
|
61
64
|
invisible="fiscal_operation_type == 'all'"
|
|
@@ -96,11 +99,7 @@
|
|
|
96
99
|
</page>
|
|
97
100
|
</notebook>
|
|
98
101
|
</sheet>
|
|
99
|
-
<
|
|
100
|
-
<field name="message_follower_ids" groups="base.group_user" />
|
|
101
|
-
<field name="activity_ids" />
|
|
102
|
-
<field name="message_ids" />
|
|
103
|
-
</div>
|
|
102
|
+
<chatter />
|
|
104
103
|
</form>
|
|
105
104
|
</field>
|
|
106
105
|
</record>
|