odoo-addon-l10n-br-fiscal 16.0.2.21.2__py3-none-any.whl → 16.0.3.0.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 +1 -1
- odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +1 -142
- odoo/addons/l10n_br_fiscal/models/__init__.py +0 -2
- odoo/addons/l10n_br_fiscal/models/document.py +200 -2
- odoo/addons/l10n_br_fiscal/models/document_mixin.py +477 -6
- odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py +45 -1
- odoo/addons/l10n_br_fiscal/models/product_template.py +10 -2
- odoo/addons/l10n_br_fiscal/static/description/index.html +1 -1
- {odoo_addon_l10n_br_fiscal-16.0.2.21.2.dist-info → odoo_addon_l10n_br_fiscal-16.0.3.0.0.dist-info}/METADATA +2 -2
- {odoo_addon_l10n_br_fiscal-16.0.2.21.2.dist-info → odoo_addon_l10n_br_fiscal-16.0.3.0.0.dist-info}/RECORD +13 -15
- odoo/addons/l10n_br_fiscal/models/document_mixin_fields.py +0 -479
- odoo/addons/l10n_br_fiscal/models/document_move_mixin.py +0 -259
- {odoo_addon_l10n_br_fiscal-16.0.2.21.2.dist-info → odoo_addon_l10n_br_fiscal-16.0.3.0.0.dist-info}/WHEEL +0 -0
- {odoo_addon_l10n_br_fiscal-16.0.2.21.2.dist-info → odoo_addon_l10n_br_fiscal-16.0.3.0.0.dist-info}/top_level.txt +0 -0
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
from odoo import api, models
|
|
5
5
|
|
|
6
|
-
from ..constants.fiscal import
|
|
6
|
+
from ..constants.fiscal import (
|
|
7
|
+
COMMENT_TYPE_COMMERCIAL,
|
|
8
|
+
COMMENT_TYPE_FISCAL,
|
|
9
|
+
DOCUMENT_ISSUER_COMPANY,
|
|
10
|
+
)
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
class FiscalDocumentMixinMethods(models.AbstractModel):
|
|
@@ -24,6 +28,46 @@ class FiscalDocumentMixinMethods(models.AbstractModel):
|
|
|
24
28
|
return {f"default_{k}": vals[k] for k in vals.keys()}
|
|
25
29
|
return vals
|
|
26
30
|
|
|
31
|
+
@api.onchange("document_type_id")
|
|
32
|
+
def _onchange_document_type_id(self):
|
|
33
|
+
if self.document_type_id and self.issuer == DOCUMENT_ISSUER_COMPANY:
|
|
34
|
+
self.document_serie_id = self.document_type_id.get_document_serie(
|
|
35
|
+
self.company_id, self.fiscal_operation_id
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
@api.onchange("document_serie_id")
|
|
39
|
+
def _onchange_document_serie_id(self):
|
|
40
|
+
if self.document_serie_id and self.issuer == DOCUMENT_ISSUER_COMPANY:
|
|
41
|
+
self.document_serie = self.document_serie_id.code
|
|
42
|
+
|
|
43
|
+
@api.onchange("fiscal_operation_id")
|
|
44
|
+
def _onchange_fiscal_operation_id(self):
|
|
45
|
+
if self.fiscal_operation_id:
|
|
46
|
+
self.fiscal_operation_type = self.fiscal_operation_id.fiscal_operation_type
|
|
47
|
+
self.edoc_purpose = self.fiscal_operation_id.edoc_purpose
|
|
48
|
+
|
|
49
|
+
if self.issuer == DOCUMENT_ISSUER_COMPANY and not self.document_type_id:
|
|
50
|
+
self.document_type_id = self.company_id.document_type_id
|
|
51
|
+
|
|
52
|
+
subsequent_documents = [(6, 0, {})]
|
|
53
|
+
for subsequent_id in self.fiscal_operation_id.mapped(
|
|
54
|
+
"operation_subsequent_ids"
|
|
55
|
+
):
|
|
56
|
+
subsequent_documents.append(
|
|
57
|
+
(
|
|
58
|
+
0,
|
|
59
|
+
0,
|
|
60
|
+
{
|
|
61
|
+
"source_document_id": self.id,
|
|
62
|
+
"subsequent_operation_id": subsequent_id.id,
|
|
63
|
+
"fiscal_operation_id": (
|
|
64
|
+
subsequent_id.subsequent_operation_id.id
|
|
65
|
+
),
|
|
66
|
+
},
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
self.document_subsequent_ids = subsequent_documents
|
|
70
|
+
|
|
27
71
|
def _get_amount_lines(self):
|
|
28
72
|
"""Get object lines instaces used to compute fields"""
|
|
29
73
|
return self.mapped("fiscal_line_ids")
|
|
@@ -53,6 +53,7 @@ class ProductTemplate(models.Model):
|
|
|
53
53
|
string="NCM",
|
|
54
54
|
compute="_compute_ncm_id",
|
|
55
55
|
store=True,
|
|
56
|
+
readonly=False,
|
|
56
57
|
)
|
|
57
58
|
|
|
58
59
|
nbm_id = fields.Many2one(
|
|
@@ -65,6 +66,7 @@ class ProductTemplate(models.Model):
|
|
|
65
66
|
default=TAX_DOMAIN_ICMS,
|
|
66
67
|
compute="_compute_tax_icms_or_issqn",
|
|
67
68
|
store=True,
|
|
69
|
+
readonly=False,
|
|
68
70
|
)
|
|
69
71
|
|
|
70
72
|
fiscal_genre_id = fields.Many2one(
|
|
@@ -72,6 +74,7 @@ class ProductTemplate(models.Model):
|
|
|
72
74
|
string="Fiscal Product Genre",
|
|
73
75
|
compute="_compute_fiscal_genre_id",
|
|
74
76
|
store=True,
|
|
77
|
+
readonly=False,
|
|
75
78
|
)
|
|
76
79
|
|
|
77
80
|
service_type_id = fields.Many2one(
|
|
@@ -85,7 +88,9 @@ class ProductTemplate(models.Model):
|
|
|
85
88
|
)
|
|
86
89
|
|
|
87
90
|
fiscal_genre_code = fields.Char(
|
|
88
|
-
related="fiscal_genre_id.code",
|
|
91
|
+
related="fiscal_genre_id.code",
|
|
92
|
+
store=True,
|
|
93
|
+
string="Fiscal Product Genre Code",
|
|
89
94
|
)
|
|
90
95
|
|
|
91
96
|
ipi_guideline_class_id = fields.Many2one(
|
|
@@ -109,7 +114,10 @@ class ProductTemplate(models.Model):
|
|
|
109
114
|
)
|
|
110
115
|
|
|
111
116
|
uoe_id = fields.Many2one(
|
|
112
|
-
comodel_name="uom.uom",
|
|
117
|
+
comodel_name="uom.uom",
|
|
118
|
+
related="ncm_id.uoe_id",
|
|
119
|
+
store=True,
|
|
120
|
+
string="Export UoM",
|
|
113
121
|
)
|
|
114
122
|
|
|
115
123
|
uoe_factor = fields.Float(string="Export UoM Factor", default=1.00)
|
|
@@ -367,7 +367,7 @@ ul.auto-toc {
|
|
|
367
367
|
!! This file is generated by oca-gen-addon-readme !!
|
|
368
368
|
!! changes will be overwritten. !!
|
|
369
369
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
370
|
-
!! source digest: sha256:
|
|
370
|
+
!! source digest: sha256:88ffb9c2b8d2b4a2b7ab271395416dc54252c665841213332396d2587f181fce
|
|
371
371
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
|
372
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/licence-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
373
|
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/l10n-brazil/16.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" /></p>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-l10n_br_fiscal
|
|
3
|
-
Version: 16.0.
|
|
3
|
+
Version: 16.0.3.0.0
|
|
4
4
|
Requires-Python: >=3.10
|
|
5
5
|
Requires-Dist: erpbrasil.base>=2.3.0
|
|
6
6
|
Requires-Dist: odoo-addon-l10n_br_base>=16.0dev,<16.1dev
|
|
@@ -25,7 +25,7 @@ Módulo fiscal brasileiro
|
|
|
25
25
|
!! This file is generated by oca-gen-addon-readme !!
|
|
26
26
|
!! changes will be overwritten. !!
|
|
27
27
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
28
|
-
!! source digest: sha256:
|
|
28
|
+
!! source digest: sha256:88ffb9c2b8d2b4a2b7ab271395416dc54252c665841213332396d2587f181fce
|
|
29
29
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
30
30
|
|
|
31
31
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
odoo/addons/l10n_br_fiscal/README.rst,sha256=
|
|
1
|
+
odoo/addons/l10n_br_fiscal/README.rst,sha256=f11XgxPFxlnKVO9iuHC3HwxUxgv1jdH0oIX93zOtQGY,13644
|
|
2
2
|
odoo/addons/l10n_br_fiscal/__init__.py,sha256=BQXfCjW4ehK1W1j0z6k8xN7Q2LoZBCjjvYDkQt6nSkI,2717
|
|
3
|
-
odoo/addons/l10n_br_fiscal/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/l10n_br_fiscal/__manifest__.py,sha256=fhNTwT6m7_GxD2mHvKDcGLDXRwd47B-dcbILIJlQbmA,4913
|
|
4
4
|
odoo/addons/l10n_br_fiscal/tools.py,sha256=4oAxP-kPKq3L3xhNdhOivxWakJa-j0ISpVIBCtsB0NQ,4061
|
|
5
5
|
odoo/addons/l10n_br_fiscal/constants/fiscal.py,sha256=F2a4jYAk2j2Yh1Xw7WeS1GcLfW1DbjeNgEF6l7135wc,14962
|
|
6
6
|
odoo/addons/l10n_br_fiscal/constants/icms.py,sha256=rHlM6jyRvhrIm03sd6guS1xh7SptADLltPmRJ3C_Vh8,3512
|
|
@@ -54,11 +54,11 @@ odoo/addons/l10n_br_fiscal/demo/partner_demo.xml,sha256=dPFBshkjUmIdkp5X4UPDVtFc
|
|
|
54
54
|
odoo/addons/l10n_br_fiscal/demo/product_demo.xml,sha256=xaJuXOdRp_DSWxrkoKaC6HAuMpgCGjDe9KHh_-iOxAo,83287
|
|
55
55
|
odoo/addons/l10n_br_fiscal/demo/res_users_demo.xml,sha256=AC4vPENbLT1TFTvp4juJHO4d9z1B_LDkYoWDyph_7nM,561
|
|
56
56
|
odoo/addons/l10n_br_fiscal/demo/subsequent_operation_demo.xml,sha256=Lw8d_H2ebpnOfBwgr0t6C9feGSPO13ihxmWMz3BJoIE,522
|
|
57
|
-
odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot,sha256=
|
|
57
|
+
odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot,sha256=2_f0uow981MiIKPuq1KFz5HSn7ua00HKq8es9OiBaRQ,424840
|
|
58
58
|
odoo/addons/l10n_br_fiscal/i18n/pt_BR.po,sha256=kgX6hjtpZ4I1xIOy2S-YL848CETHn6v_L6ndzMDYTxY,496094
|
|
59
59
|
odoo/addons/l10n_br_fiscal/migrations/16.0.2.0.0/pre-migration.py,sha256=tw6d7NZrbOmjEaGHI9y-AMiNWNqf_mceTFqTFXuc6cU,687
|
|
60
60
|
odoo/addons/l10n_br_fiscal/migrations/16.0.2.15.0/pre-migration.py,sha256=5-aWMxFdyNbyw_MJbfyiSFHnm9zxWKYHibOW5GNauWc,517
|
|
61
|
-
odoo/addons/l10n_br_fiscal/models/__init__.py,sha256=
|
|
61
|
+
odoo/addons/l10n_br_fiscal/models/__init__.py,sha256=YQ9muGJ6AepMwV4lwhsaX2iOTvrP36Bioz3mAjhfShI,1713
|
|
62
62
|
odoo/addons/l10n_br_fiscal/models/cest.py,sha256=FKWv89l6m9LiB-LPN789917BwCkWshSj2nlZ6yrNtpE,1955
|
|
63
63
|
odoo/addons/l10n_br_fiscal/models/cfop.py,sha256=uA_kvyXZbRfhjQLsrxFk_Ofp3LxMdsdltdmMduQZDeQ,5215
|
|
64
64
|
odoo/addons/l10n_br_fiscal/models/city_taxation_code.py,sha256=2uqZoJmhip1KcvliKsUYpfzB6RecAv9dC-7sFkRJVgc,1192
|
|
@@ -68,15 +68,13 @@ odoo/addons/l10n_br_fiscal/models/cst.py,sha256=m3KIalTYxOoiydXje4VHni6knmXZVdR3
|
|
|
68
68
|
odoo/addons/l10n_br_fiscal/models/data_abstract.py,sha256=OwFGbvuNV57APApmYf1jJ3H3-UlY2FHJDPNB2OwTmXc,3489
|
|
69
69
|
odoo/addons/l10n_br_fiscal/models/data_ncm_nbs_abstract.py,sha256=rHm2r3o0nwo3ZDOdrrTosU9Thzqt_D7SZWaxjgnR81I,6763
|
|
70
70
|
odoo/addons/l10n_br_fiscal/models/data_product_abstract.py,sha256=wbc3exJQp33aYK8IOJ490JvDWBPCpU0NEkMR6YjaLfQ,793
|
|
71
|
-
odoo/addons/l10n_br_fiscal/models/document.py,sha256=
|
|
71
|
+
odoo/addons/l10n_br_fiscal/models/document.py,sha256=dzrKZW-bCHOJ3xgNVeedGfmYI7wyX1wg1Jx15Q-dGSI,25343
|
|
72
72
|
odoo/addons/l10n_br_fiscal/models/document_email.py,sha256=ikGhCrTI18X01RszlCqO0tvhTOKr2d5KJLcj_QA1o_Y,2113
|
|
73
73
|
odoo/addons/l10n_br_fiscal/models/document_line.py,sha256=ziiAHFNYphxZL-ojPG9f_isepEV0hbQdZgvXpJDIbZw,1380
|
|
74
74
|
odoo/addons/l10n_br_fiscal/models/document_line_mixin.py,sha256=7VMtG7DZ5RGF33ws5cencbRMelu_Eyvr68rXmjC5LG8,26816
|
|
75
75
|
odoo/addons/l10n_br_fiscal/models/document_line_mixin_methods.py,sha256=uEw6GyR9arzE3XcGozxnKJrSxcpzTycrx2IEfFZq9pQ,30108
|
|
76
|
-
odoo/addons/l10n_br_fiscal/models/document_mixin.py,sha256=
|
|
77
|
-
odoo/addons/l10n_br_fiscal/models/
|
|
78
|
-
odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py,sha256=ZSCYHKTXFfbcARgxHfT_qQckvJNf4jlZZ172Yxr-DGM,12436
|
|
79
|
-
odoo/addons/l10n_br_fiscal/models/document_move_mixin.py,sha256=LWa1AjlXUp4muTMWmsP2TJzZi_58AmwDVZvVGVIcCoU,7052
|
|
76
|
+
odoo/addons/l10n_br_fiscal/models/document_mixin.py,sha256=5qDco4d5ym-iRP0nPs3sDPP88ohgeXVvbptzH6hfmXs,12105
|
|
77
|
+
odoo/addons/l10n_br_fiscal/models/document_mixin_methods.py,sha256=VoDk2nnsMbz5vxOBUNnMdjAw7_2OqFPAQiAG6CRong4,14191
|
|
80
78
|
odoo/addons/l10n_br_fiscal/models/document_related.py,sha256=4_25SCQXPVcfU1MTtTfELjWzSHus-K1sE05w1e6PU7A,4607
|
|
81
79
|
odoo/addons/l10n_br_fiscal/models/document_serie.py,sha256=Spe7kpgMBFGS_LBv3DpiqTC4WuafTK8LRv53GVR2UcM,4128
|
|
82
80
|
odoo/addons/l10n_br_fiscal/models/document_supplement.py,sha256=31oRSHT_SaGSf-dQvriweIxZZiTANxkHHupc5kMYfXA,409
|
|
@@ -96,7 +94,7 @@ odoo/addons/l10n_br_fiscal/models/partner_profile.py,sha256=0crL892OKXZyv188KhjG
|
|
|
96
94
|
odoo/addons/l10n_br_fiscal/models/product_genre.py,sha256=Q4NhYuwCNfwKqU6W_EOb9tzqFQ9EmOFxQZiNUm3NrVs,426
|
|
97
95
|
odoo/addons/l10n_br_fiscal/models/product_mixin.py,sha256=G6jXD-tZm38PS0T8BDEv632T5zJ4UaG-YUvq5VovWWs,1651
|
|
98
96
|
odoo/addons/l10n_br_fiscal/models/product_product.py,sha256=oo-vk3FF438qeQrI7LosD0vq1-YuTgfVqrq3_UrmdgY,300
|
|
99
|
-
odoo/addons/l10n_br_fiscal/models/product_template.py,sha256=
|
|
97
|
+
odoo/addons/l10n_br_fiscal/models/product_template.py,sha256=9mfvf-wGpibqjCIKqeQpuJragloZ2JWK05VbwTd5SEw,4142
|
|
100
98
|
odoo/addons/l10n_br_fiscal/models/res_company.py,sha256=3aEriHya9Fk3jtTHz3WPAPblJRTyf54vYLLIs5PCXjs,16255
|
|
101
99
|
odoo/addons/l10n_br_fiscal/models/res_config_settings.py,sha256=wqYGsGSNkbypOEU5pk2LMPYZCy7_VSdZw44hYxGpCbo,1325
|
|
102
100
|
odoo/addons/l10n_br_fiscal/models/res_country_state.py,sha256=5hxWhGXqCqcH1aChGGm36d5WGjYaZXiRmDyASA6_7AM,483
|
|
@@ -128,7 +126,7 @@ odoo/addons/l10n_br_fiscal/readme/USAGE.md,sha256=Dw3uZaHJCUtV0xFq6VOQvF2G5fS_oS
|
|
|
128
126
|
odoo/addons/l10n_br_fiscal/security/fiscal_security.xml,sha256=c4D3MoIsVnkZ1pDY_iw8jM2hBPz3VCkl5JKnm_hkau0,3700
|
|
129
127
|
odoo/addons/l10n_br_fiscal/security/ir.model.access.csv,sha256=3E9q6uzshDOKbm2zUV8cv2x1EIV3WkAkqjaq4_sOUtM,14918
|
|
130
128
|
odoo/addons/l10n_br_fiscal/static/description/icon.png,sha256=Vd1HydYBoGCzNfCqxLlch2i2aeCcyxo-uRxWNp6oMbw,14836
|
|
131
|
-
odoo/addons/l10n_br_fiscal/static/description/index.html,sha256=
|
|
129
|
+
odoo/addons/l10n_br_fiscal/static/description/index.html,sha256=DNKiztHrQKmk8BUwYPn2oM1wqjwQWnNuvLSM2G7NZ8M,26274
|
|
132
130
|
odoo/addons/l10n_br_fiscal/static/img/fiscal_dashboard.png,sha256=Q0fpqFNqEXh6m6E1aJfzSKV2tQ9lC1Y-ofUt6qxVupc,151668
|
|
133
131
|
odoo/addons/l10n_br_fiscal/static/img/fiscal_line.png,sha256=S4Q4OGSzGnbfm4W5sQVvnD4uUzxS6tbJGT_gs3pB4K0,134276
|
|
134
132
|
odoo/addons/l10n_br_fiscal/static/img/fiscal_operation.png,sha256=2614c1XjxwVznh707e9gujlUXg0ttutKD1ZiSMTqyv8,105871
|
|
@@ -199,7 +197,7 @@ odoo/addons/l10n_br_fiscal/views/uom_uom.xml,sha256=pqq2l0Vd8nz3oJBoe2GERQFMB3I5
|
|
|
199
197
|
odoo/addons/l10n_br_fiscal/wizards/__init__.py,sha256=_sLxjpuJblbtSngjCsnMm7Iur5afF5xLEkAQLu4sy7I,69
|
|
200
198
|
odoo/addons/l10n_br_fiscal/wizards/base_wizard_mixin.py,sha256=-r25us0vdNCSe11Gnf_tyPtN1qq-JKsL-fgWbPGktRo,2856
|
|
201
199
|
odoo/addons/l10n_br_fiscal/wizards/document_status_wizard.py,sha256=KsYj5YWWePO7uk0psBsFdnCL71eLWhcyg7_c7J4G6vA,818
|
|
202
|
-
odoo_addon_l10n_br_fiscal-16.0.
|
|
203
|
-
odoo_addon_l10n_br_fiscal-16.0.
|
|
204
|
-
odoo_addon_l10n_br_fiscal-16.0.
|
|
205
|
-
odoo_addon_l10n_br_fiscal-16.0.
|
|
200
|
+
odoo_addon_l10n_br_fiscal-16.0.3.0.0.dist-info/METADATA,sha256=ljoZ-b2400TALJvyLQdjrhpjSx1bPLn7ekeGPJjQGKw,14315
|
|
201
|
+
odoo_addon_l10n_br_fiscal-16.0.3.0.0.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
|
202
|
+
odoo_addon_l10n_br_fiscal-16.0.3.0.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
|
203
|
+
odoo_addon_l10n_br_fiscal-16.0.3.0.0.dist-info/RECORD,,
|
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2019 Renato Lima - Akretion <renato.lima@akretion.com.br>
|
|
2
|
-
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
|
-
|
|
4
|
-
from odoo import api, fields, models
|
|
5
|
-
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
|
|
6
|
-
|
|
7
|
-
from ..constants.fiscal import (
|
|
8
|
-
FINAL_CUSTOMER,
|
|
9
|
-
FINAL_CUSTOMER_YES,
|
|
10
|
-
FISCAL_COMMENT_DOCUMENT,
|
|
11
|
-
NFE_IND_PRES,
|
|
12
|
-
NFE_IND_PRES_DEFAULT,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class FiscalDocumentMixinFields(models.AbstractModel):
|
|
17
|
-
_name = "l10n_br_fiscal.document.mixin.fields"
|
|
18
|
-
_description = "Document Fiscal Mixin Fields"
|
|
19
|
-
|
|
20
|
-
def _date_server_format(self):
|
|
21
|
-
return fields.Datetime.now().strftime(DEFAULT_SERVER_DATETIME_FORMAT)
|
|
22
|
-
|
|
23
|
-
@api.model
|
|
24
|
-
def _default_operation(self):
|
|
25
|
-
return False
|
|
26
|
-
|
|
27
|
-
@api.model
|
|
28
|
-
def _operation_domain(self):
|
|
29
|
-
domain = (
|
|
30
|
-
"[('state', '=', 'approved'),"
|
|
31
|
-
"'|',"
|
|
32
|
-
f"('company_id', '=', {self.env.company.id}),"
|
|
33
|
-
"('company_id', '=', False),"
|
|
34
|
-
)
|
|
35
|
-
return domain
|
|
36
|
-
|
|
37
|
-
fiscal_operation_id = fields.Many2one(
|
|
38
|
-
comodel_name="l10n_br_fiscal.operation",
|
|
39
|
-
string="Operation",
|
|
40
|
-
domain=lambda self: self._operation_domain(),
|
|
41
|
-
default=_default_operation,
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
operation_name = fields.Char(
|
|
45
|
-
copy=False,
|
|
46
|
-
compute="_compute_operation_name",
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
#
|
|
50
|
-
# Company and Partner are defined here to avoid warnings on runbot
|
|
51
|
-
#
|
|
52
|
-
company_id = fields.Many2one(
|
|
53
|
-
comodel_name="res.company",
|
|
54
|
-
string="Company",
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
partner_id = fields.Many2one(
|
|
58
|
-
comodel_name="res.partner",
|
|
59
|
-
index=True,
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
fiscal_operation_type = fields.Selection(
|
|
63
|
-
related="fiscal_operation_id.fiscal_operation_type",
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
ind_pres = fields.Selection(
|
|
67
|
-
selection=NFE_IND_PRES,
|
|
68
|
-
string="Buyer Presence",
|
|
69
|
-
default=NFE_IND_PRES_DEFAULT,
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
comment_ids = fields.Many2many(
|
|
73
|
-
comodel_name="l10n_br_fiscal.comment",
|
|
74
|
-
relation="l10n_br_fiscal_document_mixin_comment_rel",
|
|
75
|
-
column1="document_mixin_id",
|
|
76
|
-
column2="comment_id",
|
|
77
|
-
string="Comments",
|
|
78
|
-
domain=[("object", "=", FISCAL_COMMENT_DOCUMENT)],
|
|
79
|
-
compute="_compute_comment_ids",
|
|
80
|
-
store=True,
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
fiscal_additional_data = fields.Text()
|
|
84
|
-
|
|
85
|
-
manual_fiscal_additional_data = fields.Text(
|
|
86
|
-
help="Fiscal Additional data manually entered by user",
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
customer_additional_data = fields.Text()
|
|
90
|
-
|
|
91
|
-
manual_customer_additional_data = fields.Text(
|
|
92
|
-
help="Customer Additional data manually entered by user",
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
ind_final = fields.Selection(
|
|
96
|
-
selection=FINAL_CUSTOMER,
|
|
97
|
-
string="Final Consumption Operation",
|
|
98
|
-
default=FINAL_CUSTOMER_YES,
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
currency_id = fields.Many2one(
|
|
102
|
-
comodel_name="res.currency",
|
|
103
|
-
string="Currency",
|
|
104
|
-
default=lambda self: self.env.company.currency_id,
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
amount_price_gross = fields.Monetary(
|
|
108
|
-
compute="_compute_fiscal_amount",
|
|
109
|
-
store=True,
|
|
110
|
-
string="Amount Gross",
|
|
111
|
-
help="Amount without discount.",
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
amount_untaxed = fields.Monetary(
|
|
115
|
-
compute="_compute_fiscal_amount",
|
|
116
|
-
store=True,
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
amount_icms_base = fields.Monetary(
|
|
120
|
-
string="ICMS Base",
|
|
121
|
-
compute="_compute_fiscal_amount",
|
|
122
|
-
store=True,
|
|
123
|
-
)
|
|
124
|
-
|
|
125
|
-
amount_icms_value = fields.Monetary(
|
|
126
|
-
string="ICMS Value",
|
|
127
|
-
compute="_compute_fiscal_amount",
|
|
128
|
-
store=True,
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
amount_icmsst_base = fields.Monetary(
|
|
132
|
-
string="ICMS ST Base",
|
|
133
|
-
compute="_compute_fiscal_amount",
|
|
134
|
-
store=True,
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
amount_icmsst_value = fields.Monetary(
|
|
138
|
-
string="ICMS ST Value",
|
|
139
|
-
compute="_compute_fiscal_amount",
|
|
140
|
-
store=True,
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
amount_icmssn_credit_value = fields.Monetary(
|
|
144
|
-
string="ICMSSN Credit Value",
|
|
145
|
-
compute="_compute_fiscal_amount",
|
|
146
|
-
store=True,
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
amount_icmsfcp_base = fields.Monetary(
|
|
150
|
-
string="ICMS FCP Base",
|
|
151
|
-
compute="_compute_fiscal_amount",
|
|
152
|
-
store=True,
|
|
153
|
-
)
|
|
154
|
-
|
|
155
|
-
amount_icmsfcp_value = fields.Monetary(
|
|
156
|
-
string="ICMS FCP Value",
|
|
157
|
-
compute="_compute_fiscal_amount",
|
|
158
|
-
store=True,
|
|
159
|
-
)
|
|
160
|
-
|
|
161
|
-
amount_icmsfcpst_value = fields.Monetary(
|
|
162
|
-
string="ICMS FCP ST Value",
|
|
163
|
-
compute="_compute_fiscal_amount",
|
|
164
|
-
store=True,
|
|
165
|
-
)
|
|
166
|
-
|
|
167
|
-
amount_icms_destination_value = fields.Monetary(
|
|
168
|
-
string="ICMS Destination Value",
|
|
169
|
-
compute="_compute_fiscal_amount",
|
|
170
|
-
store=True,
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
amount_icms_origin_value = fields.Monetary(
|
|
174
|
-
string="ICMS Origin Value",
|
|
175
|
-
compute="_compute_fiscal_amount",
|
|
176
|
-
store=True,
|
|
177
|
-
)
|
|
178
|
-
|
|
179
|
-
amount_ipi_base = fields.Monetary(
|
|
180
|
-
string="IPI Base",
|
|
181
|
-
compute="_compute_fiscal_amount",
|
|
182
|
-
store=True,
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
amount_ipi_value = fields.Monetary(
|
|
186
|
-
string="IPI Value",
|
|
187
|
-
compute="_compute_fiscal_amount",
|
|
188
|
-
store=True,
|
|
189
|
-
)
|
|
190
|
-
|
|
191
|
-
amount_ii_base = fields.Monetary(
|
|
192
|
-
string="II Base",
|
|
193
|
-
compute="_compute_fiscal_amount",
|
|
194
|
-
store=True,
|
|
195
|
-
)
|
|
196
|
-
|
|
197
|
-
amount_ii_value = fields.Monetary(
|
|
198
|
-
string="II Value",
|
|
199
|
-
compute="_compute_fiscal_amount",
|
|
200
|
-
store=True,
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
amount_ii_customhouse_charges = fields.Monetary(
|
|
204
|
-
string="Customhouse Charges",
|
|
205
|
-
compute="_compute_fiscal_amount",
|
|
206
|
-
store=True,
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
amount_pis_base = fields.Monetary(
|
|
210
|
-
string="PIS Base",
|
|
211
|
-
compute="_compute_fiscal_amount",
|
|
212
|
-
store=True,
|
|
213
|
-
)
|
|
214
|
-
|
|
215
|
-
amount_pis_value = fields.Monetary(
|
|
216
|
-
string="PIS Value",
|
|
217
|
-
compute="_compute_fiscal_amount",
|
|
218
|
-
store=True,
|
|
219
|
-
)
|
|
220
|
-
|
|
221
|
-
amount_pisst_base = fields.Monetary(
|
|
222
|
-
string="PIS ST Base",
|
|
223
|
-
compute="_compute_fiscal_amount",
|
|
224
|
-
store=True,
|
|
225
|
-
)
|
|
226
|
-
|
|
227
|
-
amount_pisst_value = fields.Monetary(
|
|
228
|
-
string="PIS ST Value",
|
|
229
|
-
compute="_compute_fiscal_amount",
|
|
230
|
-
store=True,
|
|
231
|
-
)
|
|
232
|
-
|
|
233
|
-
amount_pis_wh_base = fields.Monetary(
|
|
234
|
-
string="PIS Ret Base",
|
|
235
|
-
compute="_compute_fiscal_amount",
|
|
236
|
-
store=True,
|
|
237
|
-
)
|
|
238
|
-
|
|
239
|
-
amount_pis_wh_value = fields.Monetary(
|
|
240
|
-
string="PIS Ret Value",
|
|
241
|
-
compute="_compute_fiscal_amount",
|
|
242
|
-
store=True,
|
|
243
|
-
)
|
|
244
|
-
|
|
245
|
-
amount_cofins_base = fields.Monetary(
|
|
246
|
-
string="COFINS Base",
|
|
247
|
-
compute="_compute_fiscal_amount",
|
|
248
|
-
store=True,
|
|
249
|
-
)
|
|
250
|
-
|
|
251
|
-
amount_cofins_value = fields.Monetary(
|
|
252
|
-
string="COFINS Value",
|
|
253
|
-
compute="_compute_fiscal_amount",
|
|
254
|
-
store=True,
|
|
255
|
-
)
|
|
256
|
-
|
|
257
|
-
amount_cofinsst_base = fields.Monetary(
|
|
258
|
-
string="COFINS ST Base",
|
|
259
|
-
compute="_compute_fiscal_amount",
|
|
260
|
-
store=True,
|
|
261
|
-
)
|
|
262
|
-
|
|
263
|
-
amount_cofinsst_value = fields.Monetary(
|
|
264
|
-
string="COFINS ST Value",
|
|
265
|
-
compute="_compute_fiscal_amount",
|
|
266
|
-
store=True,
|
|
267
|
-
)
|
|
268
|
-
|
|
269
|
-
amount_cofins_wh_base = fields.Monetary(
|
|
270
|
-
string="COFINS Ret Base",
|
|
271
|
-
compute="_compute_fiscal_amount",
|
|
272
|
-
store=True,
|
|
273
|
-
)
|
|
274
|
-
|
|
275
|
-
amount_cofins_wh_value = fields.Monetary(
|
|
276
|
-
string="COFINS Ret Value",
|
|
277
|
-
compute="_compute_fiscal_amount",
|
|
278
|
-
store=True,
|
|
279
|
-
)
|
|
280
|
-
|
|
281
|
-
amount_issqn_base = fields.Monetary(
|
|
282
|
-
string="ISSQN Base",
|
|
283
|
-
compute="_compute_fiscal_amount",
|
|
284
|
-
store=True,
|
|
285
|
-
)
|
|
286
|
-
|
|
287
|
-
amount_issqn_value = fields.Monetary(
|
|
288
|
-
string="ISSQN Value",
|
|
289
|
-
compute="_compute_fiscal_amount",
|
|
290
|
-
store=True,
|
|
291
|
-
)
|
|
292
|
-
|
|
293
|
-
amount_issqn_wh_base = fields.Monetary(
|
|
294
|
-
string="ISSQN Ret Base",
|
|
295
|
-
compute="_compute_fiscal_amount",
|
|
296
|
-
store=True,
|
|
297
|
-
)
|
|
298
|
-
|
|
299
|
-
amount_issqn_wh_value = fields.Monetary(
|
|
300
|
-
string="ISSQN Ret Value",
|
|
301
|
-
compute="_compute_fiscal_amount",
|
|
302
|
-
store=True,
|
|
303
|
-
)
|
|
304
|
-
|
|
305
|
-
amount_csll_base = fields.Monetary(
|
|
306
|
-
string="CSLL Base",
|
|
307
|
-
compute="_compute_fiscal_amount",
|
|
308
|
-
store=True,
|
|
309
|
-
)
|
|
310
|
-
|
|
311
|
-
amount_csll_value = fields.Monetary(
|
|
312
|
-
string="CSLL Value",
|
|
313
|
-
compute="_compute_fiscal_amount",
|
|
314
|
-
store=True,
|
|
315
|
-
)
|
|
316
|
-
|
|
317
|
-
amount_csll_wh_base = fields.Monetary(
|
|
318
|
-
string="CSLL Ret Base",
|
|
319
|
-
compute="_compute_fiscal_amount",
|
|
320
|
-
store=True,
|
|
321
|
-
)
|
|
322
|
-
|
|
323
|
-
amount_csll_wh_value = fields.Monetary(
|
|
324
|
-
string="CSLL Ret Value",
|
|
325
|
-
compute="_compute_fiscal_amount",
|
|
326
|
-
store=True,
|
|
327
|
-
)
|
|
328
|
-
|
|
329
|
-
amount_irpj_base = fields.Monetary(
|
|
330
|
-
string="IRPJ Base",
|
|
331
|
-
compute="_compute_fiscal_amount",
|
|
332
|
-
store=True,
|
|
333
|
-
)
|
|
334
|
-
|
|
335
|
-
amount_irpj_value = fields.Monetary(
|
|
336
|
-
string="IRPJ Value",
|
|
337
|
-
compute="_compute_fiscal_amount",
|
|
338
|
-
store=True,
|
|
339
|
-
)
|
|
340
|
-
|
|
341
|
-
amount_irpj_wh_base = fields.Monetary(
|
|
342
|
-
string="IRPJ Ret Base",
|
|
343
|
-
compute="_compute_fiscal_amount",
|
|
344
|
-
store=True,
|
|
345
|
-
)
|
|
346
|
-
|
|
347
|
-
amount_irpj_wh_value = fields.Monetary(
|
|
348
|
-
string="IRPJ Ret Value",
|
|
349
|
-
compute="_compute_fiscal_amount",
|
|
350
|
-
store=True,
|
|
351
|
-
)
|
|
352
|
-
|
|
353
|
-
amount_inss_base = fields.Monetary(
|
|
354
|
-
string="INSS Base",
|
|
355
|
-
compute="_compute_fiscal_amount",
|
|
356
|
-
store=True,
|
|
357
|
-
)
|
|
358
|
-
|
|
359
|
-
amount_inss_value = fields.Monetary(
|
|
360
|
-
string="INSS Value",
|
|
361
|
-
compute="_compute_fiscal_amount",
|
|
362
|
-
store=True,
|
|
363
|
-
)
|
|
364
|
-
|
|
365
|
-
amount_inss_wh_base = fields.Monetary(
|
|
366
|
-
string="INSS Ret Base",
|
|
367
|
-
compute="_compute_fiscal_amount",
|
|
368
|
-
store=True,
|
|
369
|
-
)
|
|
370
|
-
|
|
371
|
-
amount_inss_wh_value = fields.Monetary(
|
|
372
|
-
string="INSS Ret Value",
|
|
373
|
-
compute="_compute_fiscal_amount",
|
|
374
|
-
store=True,
|
|
375
|
-
)
|
|
376
|
-
|
|
377
|
-
amount_estimate_tax = fields.Monetary(
|
|
378
|
-
compute="_compute_fiscal_amount",
|
|
379
|
-
store=True,
|
|
380
|
-
)
|
|
381
|
-
|
|
382
|
-
amount_tax = fields.Monetary(
|
|
383
|
-
compute="_compute_fiscal_amount",
|
|
384
|
-
store=True,
|
|
385
|
-
)
|
|
386
|
-
|
|
387
|
-
amount_total = fields.Monetary(
|
|
388
|
-
compute="_compute_fiscal_amount",
|
|
389
|
-
store=True,
|
|
390
|
-
)
|
|
391
|
-
|
|
392
|
-
amount_tax_withholding = fields.Monetary(
|
|
393
|
-
string="Tax Withholding",
|
|
394
|
-
compute="_compute_fiscal_amount",
|
|
395
|
-
store=True,
|
|
396
|
-
)
|
|
397
|
-
|
|
398
|
-
amount_financial_total = fields.Monetary(
|
|
399
|
-
string="Amount Financial",
|
|
400
|
-
compute="_compute_fiscal_amount",
|
|
401
|
-
store=True,
|
|
402
|
-
)
|
|
403
|
-
|
|
404
|
-
amount_discount_value = fields.Monetary(
|
|
405
|
-
string="Amount Discount",
|
|
406
|
-
compute="_compute_fiscal_amount",
|
|
407
|
-
store=True,
|
|
408
|
-
)
|
|
409
|
-
|
|
410
|
-
amount_financial_total_gross = fields.Monetary(
|
|
411
|
-
string="Amount Financial Gross",
|
|
412
|
-
compute="_compute_fiscal_amount",
|
|
413
|
-
store=True,
|
|
414
|
-
)
|
|
415
|
-
|
|
416
|
-
amount_financial_discount_value = fields.Monetary(
|
|
417
|
-
string="Financial Discount Value",
|
|
418
|
-
compute="_compute_fiscal_amount",
|
|
419
|
-
store=True,
|
|
420
|
-
)
|
|
421
|
-
|
|
422
|
-
amount_insurance_value = fields.Monetary(
|
|
423
|
-
string="Insurance Value",
|
|
424
|
-
compute="_compute_fiscal_amount",
|
|
425
|
-
store=True,
|
|
426
|
-
inverse="_inverse_amount_insurance",
|
|
427
|
-
)
|
|
428
|
-
|
|
429
|
-
amount_other_value = fields.Monetary(
|
|
430
|
-
string="Other Costs",
|
|
431
|
-
compute="_compute_fiscal_amount",
|
|
432
|
-
store=True,
|
|
433
|
-
inverse="_inverse_amount_other",
|
|
434
|
-
)
|
|
435
|
-
|
|
436
|
-
amount_freight_value = fields.Monetary(
|
|
437
|
-
string="Freight Value",
|
|
438
|
-
compute="_compute_fiscal_amount",
|
|
439
|
-
store=True,
|
|
440
|
-
inverse="_inverse_amount_freight",
|
|
441
|
-
)
|
|
442
|
-
|
|
443
|
-
# Usado para tornar Somente Leitura os campos totais dos custos
|
|
444
|
-
# de entrega quando a definição for por Linha
|
|
445
|
-
delivery_costs = fields.Selection(
|
|
446
|
-
related="company_id.delivery_costs",
|
|
447
|
-
)
|
|
448
|
-
|
|
449
|
-
force_compute_delivery_costs_by_total = fields.Boolean(default=False)
|
|
450
|
-
|
|
451
|
-
document_type_id = fields.Many2one(
|
|
452
|
-
comodel_name="l10n_br_fiscal.document.type",
|
|
453
|
-
)
|
|
454
|
-
|
|
455
|
-
document_serie_id = fields.Many2one(
|
|
456
|
-
comodel_name="l10n_br_fiscal.document.serie",
|
|
457
|
-
domain="[('active', '=', True)," "('document_type_id', '=', document_type_id)]",
|
|
458
|
-
)
|
|
459
|
-
|
|
460
|
-
document_serie = fields.Char(
|
|
461
|
-
string="Serie Number",
|
|
462
|
-
)
|
|
463
|
-
|
|
464
|
-
document_number = fields.Char(
|
|
465
|
-
copy=False,
|
|
466
|
-
index=True,
|
|
467
|
-
unaccent=False,
|
|
468
|
-
)
|
|
469
|
-
|
|
470
|
-
document_key = fields.Char(
|
|
471
|
-
string="Key",
|
|
472
|
-
copy=False,
|
|
473
|
-
index=True,
|
|
474
|
-
unaccent=False,
|
|
475
|
-
)
|
|
476
|
-
|
|
477
|
-
key_random_code = fields.Char(string="Document Key Random Code")
|
|
478
|
-
key_check_digit = fields.Char(string="Document Key Check Digit")
|
|
479
|
-
total_weight = fields.Float()
|