odoo-addon-l10n-br-fiscal 15.0.2.0.0.2__py3-none-any.whl → 15.0.2.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 +1 -1
- odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +8 -8
- odoo/addons/l10n_br_fiscal/i18n/pt_BR.po +297 -826
- odoo/addons/l10n_br_fiscal/models/__init__.py +0 -9
- odoo/addons/l10n_br_fiscal/models/ncm.py +27 -0
- odoo/addons/l10n_br_fiscal/models/tax_definition.py +189 -1
- odoo/addons/l10n_br_fiscal/static/description/index.html +1 -1
- {odoo_addon_l10n_br_fiscal-15.0.2.0.0.2.dist-info → odoo_addon_l10n_br_fiscal-15.0.2.1.0.dist-info}/METADATA +2 -2
- {odoo_addon_l10n_br_fiscal-15.0.2.0.0.2.dist-info → odoo_addon_l10n_br_fiscal-15.0.2.1.0.dist-info}/RECORD +12 -21
- odoo/addons/l10n_br_fiscal/models/ncm_cest.py +0 -17
- odoo/addons/l10n_br_fiscal/models/ncm_nbm.py +0 -17
- odoo/addons/l10n_br_fiscal/models/ncm_tax_pis_cofins.py +0 -17
- odoo/addons/l10n_br_fiscal/models/tax_definition_benefit.py +0 -118
- odoo/addons/l10n_br_fiscal/models/tax_definition_cfop.py +0 -35
- odoo/addons/l10n_br_fiscal/models/tax_definition_company.py +0 -28
- odoo/addons/l10n_br_fiscal/models/tax_definition_icms.py +0 -35
- odoo/addons/l10n_br_fiscal/models/tax_definition_operation_line.py +0 -36
- odoo/addons/l10n_br_fiscal/models/tax_definition_partner_profile.py +0 -32
- {odoo_addon_l10n_br_fiscal-15.0.2.0.0.2.dist-info → odoo_addon_l10n_br_fiscal-15.0.2.1.0.dist-info}/WHEEL +0 -0
- {odoo_addon_l10n_br_fiscal-15.0.2.0.0.2.dist-info → odoo_addon_l10n_br_fiscal-15.0.2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -19,26 +19,17 @@ from . import nbs
|
|
|
19
19
|
from . import service_type
|
|
20
20
|
from . import ncm
|
|
21
21
|
from . import nbm
|
|
22
|
-
from . import ncm_nbm
|
|
23
22
|
from . import cest
|
|
24
|
-
from . import ncm_cest
|
|
25
23
|
from . import tax_group
|
|
26
24
|
from . import tax
|
|
27
25
|
from . import tax_pis_cofins
|
|
28
26
|
from . import tax_pis_cofins_base
|
|
29
27
|
from . import tax_pis_cofins_credit
|
|
30
|
-
from . import ncm_tax_pis_cofins
|
|
31
28
|
from . import tax_ipi_control_seal
|
|
32
29
|
from . import tax_ipi_guideline
|
|
33
30
|
from . import tax_ipi_guideline_class
|
|
34
31
|
from . import tax_estimate
|
|
35
32
|
from . import tax_definition
|
|
36
|
-
from . import tax_definition_benefit
|
|
37
|
-
from . import tax_definition_company
|
|
38
|
-
from . import tax_definition_cfop
|
|
39
|
-
from . import tax_definition_icms
|
|
40
|
-
from . import tax_definition_operation_line
|
|
41
|
-
from . import tax_definition_partner_profile
|
|
42
33
|
from . import icms_regulation
|
|
43
34
|
from . import icms_relief
|
|
44
35
|
from . import document_type
|
|
@@ -51,6 +51,33 @@ class Ncm(models.Model):
|
|
|
51
51
|
string="Tax Definition",
|
|
52
52
|
)
|
|
53
53
|
|
|
54
|
+
cest_ids = fields.Many2many(
|
|
55
|
+
comodel_name="l10n_br_fiscal.cest",
|
|
56
|
+
relation="fiscal_cest_ncm_rel",
|
|
57
|
+
column1="ncm_id",
|
|
58
|
+
column2="cest_id",
|
|
59
|
+
readonly=True,
|
|
60
|
+
string="CESTs",
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
nbm_ids = fields.Many2many(
|
|
64
|
+
comodel_name="l10n_br_fiscal.nbm",
|
|
65
|
+
relation="fiscal_nbm_ncm_rel",
|
|
66
|
+
column1="ncm_id",
|
|
67
|
+
column2="nbm_id",
|
|
68
|
+
readonly=True,
|
|
69
|
+
string="NBMs",
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
piscofins_ids = fields.Many2many(
|
|
73
|
+
comodel_name="l10n_br_fiscal.tax.pis.cofins",
|
|
74
|
+
relation="fiscal_pis_cofins_ncm_rel",
|
|
75
|
+
column1="ncm_id",
|
|
76
|
+
column2="piscofins_id",
|
|
77
|
+
readonly=True,
|
|
78
|
+
string="PIS/COFINS",
|
|
79
|
+
)
|
|
80
|
+
|
|
54
81
|
_sql_constraints = [
|
|
55
82
|
(
|
|
56
83
|
"fiscal_ncm_code_exception_uniq",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
3
|
|
|
4
4
|
from odoo import _, api, fields, models
|
|
5
|
-
from odoo.exceptions import UserError
|
|
5
|
+
from odoo.exceptions import UserError, ValidationError
|
|
6
6
|
|
|
7
7
|
from .. import tools
|
|
8
8
|
from ..constants.fiscal import (
|
|
@@ -12,6 +12,7 @@ from ..constants.fiscal import (
|
|
|
12
12
|
OPERATION_STATE,
|
|
13
13
|
OPERATION_STATE_DEFAULT,
|
|
14
14
|
)
|
|
15
|
+
from ..constants.icms import ICMS_TAX_BENEFIT_TYPE
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class TaxDefinition(models.Model):
|
|
@@ -41,6 +42,19 @@ class TaxDefinition(models.Model):
|
|
|
41
42
|
|
|
42
43
|
display_name = fields.Char(compute="_compute_display_name", store=True)
|
|
43
44
|
|
|
45
|
+
code = fields.Char(
|
|
46
|
+
size=8,
|
|
47
|
+
states={"draft": [("readonly", False)]},
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
name = fields.Char(
|
|
51
|
+
states={"draft": [("readonly", False)]},
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
description = fields.Text(
|
|
55
|
+
states={"draft": [("readonly", False)]},
|
|
56
|
+
)
|
|
57
|
+
|
|
44
58
|
type_in_out = fields.Selection(
|
|
45
59
|
selection=FISCAL_IN_OUT,
|
|
46
60
|
string="Type",
|
|
@@ -238,6 +252,31 @@ class TaxDefinition(models.Model):
|
|
|
238
252
|
domain="['|', ('cst_in_id', '=', cst_id), ('cst_out_id', '=', cst_id)]",
|
|
239
253
|
)
|
|
240
254
|
|
|
255
|
+
fiscal_profile_id = fields.Many2one(
|
|
256
|
+
comodel_name="l10n_br_fiscal.partner.profile", string="Partner Profile"
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
fiscal_operation_line_id = fields.Many2one(
|
|
260
|
+
comodel_name="l10n_br_fiscal.operation.line", string="Operation Line"
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
icms_regulation_id = fields.Many2one(
|
|
264
|
+
comodel_name="l10n_br_fiscal.icms.regulation", string="ICMS Regulation"
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
cfop_id = fields.Many2one(comodel_name="l10n_br_fiscal.cfop", string="CFOP")
|
|
268
|
+
|
|
269
|
+
is_benefit = fields.Boolean(
|
|
270
|
+
string="Benefit?",
|
|
271
|
+
readonly=True,
|
|
272
|
+
states={"draft": [("readonly", False)]},
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
benefit_type = fields.Selection(
|
|
276
|
+
selection=ICMS_TAX_BENEFIT_TYPE,
|
|
277
|
+
states={"draft": [("readonly", False)]},
|
|
278
|
+
)
|
|
279
|
+
|
|
241
280
|
def _get_search_domain(self, tax_definition):
|
|
242
281
|
"""Create domain to be used in contraints methods"""
|
|
243
282
|
domain = [
|
|
@@ -247,6 +286,34 @@ class TaxDefinition(models.Model):
|
|
|
247
286
|
("tax_group_id", "=", tax_definition.tax_group_id.id),
|
|
248
287
|
("tax_id", "=", tax_definition.tax_id.id),
|
|
249
288
|
]
|
|
289
|
+
if tax_definition.icms_regulation_id:
|
|
290
|
+
domain.append(
|
|
291
|
+
("icms_regulation_id", "=", tax_definition.icms_regulation_id.id),
|
|
292
|
+
)
|
|
293
|
+
if tax_definition.icms_regulation_id and tax_definition.is_benefit:
|
|
294
|
+
domain.append(
|
|
295
|
+
("is_benefit", "=", tax_definition.is_benefit),
|
|
296
|
+
)
|
|
297
|
+
if tax_definition.ncm_ids:
|
|
298
|
+
domain.append(
|
|
299
|
+
("ncm_ids", "in", tax_definition.ncm_ids.ids),
|
|
300
|
+
)
|
|
301
|
+
if tax_definition.cest_ids:
|
|
302
|
+
domain.append(
|
|
303
|
+
("cest_ids", "in", tax_definition.cest_ids.ids),
|
|
304
|
+
)
|
|
305
|
+
if tax_definition.nbm_ids:
|
|
306
|
+
domain.append(
|
|
307
|
+
("nbm_ids", "in", tax_definition.nbm_ids.ids),
|
|
308
|
+
)
|
|
309
|
+
if tax_definition.product_ids:
|
|
310
|
+
domain.append(
|
|
311
|
+
("product_ids", "in", tax_definition.product_ids.ids),
|
|
312
|
+
)
|
|
313
|
+
if tax_definition.ncm_exception:
|
|
314
|
+
domain.append(
|
|
315
|
+
("ncm_exception", "=", tax_definition.ncm_exception),
|
|
316
|
+
)
|
|
250
317
|
return domain
|
|
251
318
|
|
|
252
319
|
def action_review(self):
|
|
@@ -415,3 +482,124 @@ class TaxDefinition(models.Model):
|
|
|
415
482
|
self.cst_id = self.tax_id.cst_out_id
|
|
416
483
|
else:
|
|
417
484
|
self.cst_id = self.tax_id.cst_in_id
|
|
485
|
+
|
|
486
|
+
@api.onchange("cfop_id")
|
|
487
|
+
def _onchange_cfop_id(self):
|
|
488
|
+
if self.cfop_id:
|
|
489
|
+
self.type_in_out = self.cfop_id.type_in_out
|
|
490
|
+
|
|
491
|
+
@api.constrains("fiscal_profile_id")
|
|
492
|
+
def _check_fiscal_profile_id(self):
|
|
493
|
+
for record in self:
|
|
494
|
+
if record.fiscal_profile_id:
|
|
495
|
+
domain = [
|
|
496
|
+
("id", "!=", record.id),
|
|
497
|
+
("fiscal_profile_id", "=", record.fiscal_profile_id.id),
|
|
498
|
+
("tax_group_id", "=", record.tax_group_id.id),
|
|
499
|
+
("tax_id", "=", record.tax_id.id),
|
|
500
|
+
]
|
|
501
|
+
|
|
502
|
+
if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
|
|
503
|
+
raise ValidationError(
|
|
504
|
+
_(
|
|
505
|
+
"Tax Definition already exists "
|
|
506
|
+
"for this Partner Profile and Tax Group !"
|
|
507
|
+
)
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
@api.constrains("fiscal_operation_line_id")
|
|
511
|
+
def _check_fiscal_operation_line_id(self):
|
|
512
|
+
for record in self:
|
|
513
|
+
if record.fiscal_operation_line_id:
|
|
514
|
+
domain = [
|
|
515
|
+
("id", "!=", record.id),
|
|
516
|
+
(
|
|
517
|
+
"fiscal_operation_line_id",
|
|
518
|
+
"=",
|
|
519
|
+
record.fiscal_operation_line_id.id,
|
|
520
|
+
),
|
|
521
|
+
("tax_group_id", "=", record.tax_group_id.id),
|
|
522
|
+
("tax_id", "=", record.tax_id.id),
|
|
523
|
+
]
|
|
524
|
+
|
|
525
|
+
if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
|
|
526
|
+
raise ValidationError(
|
|
527
|
+
_(
|
|
528
|
+
"Tax Definition already exists "
|
|
529
|
+
"for this Operation Line and Tax Group !"
|
|
530
|
+
)
|
|
531
|
+
)
|
|
532
|
+
|
|
533
|
+
@api.constrains("icms_regulation_id", "state_from_id")
|
|
534
|
+
def _check_icms(self):
|
|
535
|
+
for record in self:
|
|
536
|
+
if record.icms_regulation_id:
|
|
537
|
+
domain = self._get_search_domain(record)
|
|
538
|
+
if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
|
|
539
|
+
raise ValidationError(
|
|
540
|
+
_(
|
|
541
|
+
"Tax Definition already exists "
|
|
542
|
+
"for this ICMS and Tax Group !"
|
|
543
|
+
)
|
|
544
|
+
)
|
|
545
|
+
|
|
546
|
+
@api.constrains("company_id")
|
|
547
|
+
def _check_company_id(self):
|
|
548
|
+
for record in self:
|
|
549
|
+
if record.company_id:
|
|
550
|
+
domain = [
|
|
551
|
+
("id", "!=", record.id),
|
|
552
|
+
("company_id", "=", record.company_id.id),
|
|
553
|
+
("tax_group_id", "=", record.tax_group_id.id),
|
|
554
|
+
("tax_id", "=", record.tax_id.id),
|
|
555
|
+
]
|
|
556
|
+
|
|
557
|
+
if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
|
|
558
|
+
raise ValidationError(
|
|
559
|
+
_(
|
|
560
|
+
"Tax Definition already exists "
|
|
561
|
+
"for this Company and Tax Group !"
|
|
562
|
+
)
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
@api.constrains("cfop_id")
|
|
566
|
+
def _check_cfop_id(self):
|
|
567
|
+
for record in self:
|
|
568
|
+
if record.cfop_id:
|
|
569
|
+
domain = [
|
|
570
|
+
("id", "!=", record.id),
|
|
571
|
+
("cfop_id", "=", record.cfop_id.id),
|
|
572
|
+
("tax_group_id", "=", record.tax_group_id.id),
|
|
573
|
+
("tax_id", "=", record.tax_id.id),
|
|
574
|
+
]
|
|
575
|
+
|
|
576
|
+
if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
|
|
577
|
+
raise ValidationError(
|
|
578
|
+
_(
|
|
579
|
+
"Tax Definition already exists "
|
|
580
|
+
"for this CFOP and Tax Group !"
|
|
581
|
+
)
|
|
582
|
+
)
|
|
583
|
+
|
|
584
|
+
@api.constrains("is_benefit", "code", "benefit_type", "state_from_id")
|
|
585
|
+
def _check_tax_benefit_code(self):
|
|
586
|
+
for record in self:
|
|
587
|
+
if record.is_benefit:
|
|
588
|
+
if record.code:
|
|
589
|
+
if len(record.code) != 8:
|
|
590
|
+
raise ValidationError(
|
|
591
|
+
_("Tax benefit code must be 8 characters!")
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
if record.code[:2].upper() != record.state_from_id.code.upper():
|
|
595
|
+
raise ValidationError(
|
|
596
|
+
_("Tax benefit code must be start with state code!")
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
if record.code[3:4] != record.benefit_type:
|
|
600
|
+
raise ValidationError(
|
|
601
|
+
_(
|
|
602
|
+
"The tax benefit code must contain "
|
|
603
|
+
"the type of benefit!"
|
|
604
|
+
)
|
|
605
|
+
)
|
|
@@ -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:bd6e457ae9e21f0060721e5351b2778eba1f71bb760b9a3a96053d2b11e045af
|
|
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/15.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-15-0/l10n-brazil-15-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=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
|
373
373
|
<img alt="https://raw.githubusercontent.com/OCA/l10n-brazil/15.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" src="https://raw.githubusercontent.com/OCA/l10n-brazil/15.0/l10n_br_fiscal/static/img/fiscal_dashboard.png" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: odoo-addon-l10n_br_fiscal
|
|
3
|
-
Version: 15.0.2.
|
|
3
|
+
Version: 15.0.2.1.0
|
|
4
4
|
Summary: Fiscal module/tax engine for Brazil
|
|
5
5
|
Home-page: https://github.com/OCA/l10n-brazil
|
|
6
6
|
Author: Akretion, Odoo Community Association (OCA)
|
|
@@ -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:bd6e457ae9e21f0060721e5351b2778eba1f71bb760b9a3a96053d2b11e045af
|
|
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=ZPuGx1pP0kX12EHVjHhIrTfFf7RsSQI7ohfKSCpYwcI,13503
|
|
2
2
|
odoo/addons/l10n_br_fiscal/__init__.py,sha256=16Tdff74OkWmnKSfmV6qrNkgsK12gOtMMppwWmIAFIo,144
|
|
3
|
-
odoo/addons/l10n_br_fiscal/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/l10n_br_fiscal/__manifest__.py,sha256=HQ3Wtsdy1Y7wXCXP_JyBKzH4MgKEahzqI6nKkKBQeNo,3713
|
|
4
4
|
odoo/addons/l10n_br_fiscal/hooks.py,sha256=cna_821w1vrwbfQd59YVY66cU9hhY0av2Zwzr5nHDVI,4825
|
|
5
5
|
odoo/addons/l10n_br_fiscal/tools.py,sha256=nh67fxnJjF3Y-yfHl2mJh6TxMkr8r8GKEQ6NJliTAHE,2488
|
|
6
6
|
odoo/addons/l10n_br_fiscal/constants/fiscal.py,sha256=ICWcrew-iUcWFgF4bLzdjUtbMdaejZ0AucwLFu5u1fo,14935
|
|
@@ -58,10 +58,10 @@ odoo/addons/l10n_br_fiscal/demo/partner_demo.xml,sha256=Nuw5PaZ4ernV9bqEP4oRcsmV
|
|
|
58
58
|
odoo/addons/l10n_br_fiscal/demo/product_demo.xml,sha256=D61ewI_-geCkYnCVYN9nbflZlmX_j8xwE1UWVBTr5XE,83686
|
|
59
59
|
odoo/addons/l10n_br_fiscal/demo/res_users_demo.xml,sha256=CL7BmZ1xnWSh6MSWxrG9dK9C1ObTYGvgj21vCcY4_qE,599
|
|
60
60
|
odoo/addons/l10n_br_fiscal/demo/subsequent_operation_demo.xml,sha256=U-PJXr6uerccXT5dR8_KXKTu1YOahR0dKBcowlHgQIU,560
|
|
61
|
-
odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot,sha256=
|
|
62
|
-
odoo/addons/l10n_br_fiscal/i18n/pt_BR.po,sha256=
|
|
61
|
+
odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot,sha256=S3k-bW6JLjmSc3-eRk6S5DqTWUO1vFh3wYQrFzVyk3A,426720
|
|
62
|
+
odoo/addons/l10n_br_fiscal/i18n/pt_BR.po,sha256=RBq2-ttZAI5Yombz6DU70Yh4rQ312UPfk-6S_GPnrLA,491211
|
|
63
63
|
odoo/addons/l10n_br_fiscal/migrations/16.0.2.0.0/pre-migration.py,sha256=tw6d7NZrbOmjEaGHI9y-AMiNWNqf_mceTFqTFXuc6cU,687
|
|
64
|
-
odoo/addons/l10n_br_fiscal/models/__init__.py,sha256=
|
|
64
|
+
odoo/addons/l10n_br_fiscal/models/__init__.py,sha256=zE-qMx1nzC0XNFMb0qXQN1141RJyLXzK_s1jF6ebEP4,1784
|
|
65
65
|
odoo/addons/l10n_br_fiscal/models/cest.py,sha256=FKWv89l6m9LiB-LPN789917BwCkWshSj2nlZ6yrNtpE,1955
|
|
66
66
|
odoo/addons/l10n_br_fiscal/models/cfop.py,sha256=3MF857TFGVERQcwcDM97-PcM0Xes4uTfPsAPogZG7Q4,3263
|
|
67
67
|
odoo/addons/l10n_br_fiscal/models/city_taxation_code.py,sha256=2uqZoJmhip1KcvliKsUYpfzB6RecAv9dC-7sFkRJVgc,1192
|
|
@@ -89,10 +89,7 @@ odoo/addons/l10n_br_fiscal/models/icms_relief.py,sha256=apls6lhlGASA93O_lNCterkZ
|
|
|
89
89
|
odoo/addons/l10n_br_fiscal/models/invalidate_number.py,sha256=exacJKe7IhgLN4WMTmMek8pH6M62GRTFZHLN9y8AM_A,4795
|
|
90
90
|
odoo/addons/l10n_br_fiscal/models/nbm.py,sha256=zHjVAdy0Q9nMCcxWYhihBasDkheMIFZFQyeGM09y-90,1795
|
|
91
91
|
odoo/addons/l10n_br_fiscal/models/nbs.py,sha256=dDKYTarx7WojE7NIjWnZiIbPkytRBOXRVqdz3Ys5Fw4,868
|
|
92
|
-
odoo/addons/l10n_br_fiscal/models/ncm.py,sha256=
|
|
93
|
-
odoo/addons/l10n_br_fiscal/models/ncm_cest.py,sha256=_BwrRRR8S_G5MuLpuS7mNQPBR6UePc0w0dkplG-JE7g,430
|
|
94
|
-
odoo/addons/l10n_br_fiscal/models/ncm_nbm.py,sha256=hwyrUI_yMVGp6B7iH4RucGfrMkoxysDf3ScxGL47yho,425
|
|
95
|
-
odoo/addons/l10n_br_fiscal/models/ncm_tax_pis_cofins.py,sha256=eo1EMQ2caMxtgYh_RP9ofbgWef7fu7STwFd_XcuBccc,461
|
|
92
|
+
odoo/addons/l10n_br_fiscal/models/ncm.py,sha256=KIKGp779oQLsvgeUsTPHCfivdORu62xmcAlkUIaCUqo,2452
|
|
96
93
|
odoo/addons/l10n_br_fiscal/models/operation.py,sha256=3pAWZrxUzf3u92jwPfdU6ynN1v6P6rpyhupubnDBQaA,7950
|
|
97
94
|
odoo/addons/l10n_br_fiscal/models/operation_dashboard.py,sha256=xyNIQd5LK-Y_Y-475tRdLLjYP5gKDx9p08BM6KDhGlY,5682
|
|
98
95
|
odoo/addons/l10n_br_fiscal/models/operation_document_type.py,sha256=ZZQYNCe7lof5kb26P8GztkvLR58cA6cr33NTiz7vQOU,1511
|
|
@@ -112,13 +109,7 @@ odoo/addons/l10n_br_fiscal/models/simplified_tax_range.py,sha256=2fhHkkI8uHc22Xt
|
|
|
112
109
|
odoo/addons/l10n_br_fiscal/models/subsequent_document.py,sha256=C0x-xgFxVLgJ4Sqhv1lL5olZrSwak9u6ij39x_BKIY8,6859
|
|
113
110
|
odoo/addons/l10n_br_fiscal/models/subsequent_operation.py,sha256=KDw5l05YYg_3VELwnTPsg7oLZT1W6pKyNeKr2EFdTbs,1677
|
|
114
111
|
odoo/addons/l10n_br_fiscal/models/tax.py,sha256=8GSop6Wr6m2cH9ihSyrH-pOKrDarqTbBCZDkSMivFz8,25795
|
|
115
|
-
odoo/addons/l10n_br_fiscal/models/tax_definition.py,sha256=
|
|
116
|
-
odoo/addons/l10n_br_fiscal/models/tax_definition_benefit.py,sha256=CzNQyPv59AGVy5h1CLR1hmgsINbWh8pVfpPJf7EeLEM,3768
|
|
117
|
-
odoo/addons/l10n_br_fiscal/models/tax_definition_cfop.py,sha256=cJRy54rsKI8t819u8rOTz035vNnBIgHsi2v63vPLazg,1224
|
|
118
|
-
odoo/addons/l10n_br_fiscal/models/tax_definition_company.py,sha256=MWrdV-ni58wwgd-gCUB7QMCVlHVE2P1NSEGhzElaKW0,1011
|
|
119
|
-
odoo/addons/l10n_br_fiscal/models/tax_definition_icms.py,sha256=dkdUQCnGfiLIinsyhSdWFN-WVrR__yYPWIza0-gLIHU,1314
|
|
120
|
-
odoo/addons/l10n_br_fiscal/models/tax_definition_operation_line.py,sha256=9rnNyV9mu2PNDf0U58IDKTBf7SDQ5vrFciN-VJqVkfU,1330
|
|
121
|
-
odoo/addons/l10n_br_fiscal/models/tax_definition_partner_profile.py,sha256=0YuVIyAkuI0qy6zAg2FQ4-zHYfW_-Gn5gH3hOClJJ9o,1199
|
|
112
|
+
odoo/addons/l10n_br_fiscal/models/tax_definition.py,sha256=iIzJQs0YjJtm3uxWO3pmp03R9pUMl-ns8PDuQZX4zs0,19049
|
|
122
113
|
odoo/addons/l10n_br_fiscal/models/tax_estimate.py,sha256=9Hdy5Jznv9NRj2Fwr9TfI4Yn9r3iigRUs4BfBumOu64,1388
|
|
123
114
|
odoo/addons/l10n_br_fiscal/models/tax_group.py,sha256=_zoRvgeuKof_3VMVzlkzKjfpTTmtY6ArPgNKbcc9jsQ,2120
|
|
124
115
|
odoo/addons/l10n_br_fiscal/models/tax_ipi_control_seal.py,sha256=d3k_WZPWOJ09Wol0XSsOsXDGV40eIXz61oIbsqOwC18,310
|
|
@@ -139,7 +130,7 @@ odoo/addons/l10n_br_fiscal/readme/USAGE.rst,sha256=jDnMjM42hjTlqhbpIzjkhJo59eX4j
|
|
|
139
130
|
odoo/addons/l10n_br_fiscal/security/fiscal_security.xml,sha256=c4D3MoIsVnkZ1pDY_iw8jM2hBPz3VCkl5JKnm_hkau0,3700
|
|
140
131
|
odoo/addons/l10n_br_fiscal/security/ir.model.access.csv,sha256=a1vKKQEUKVBbu6zfvlU3ayAP7VxFi3DABsg8TYH08BM,14591
|
|
141
132
|
odoo/addons/l10n_br_fiscal/static/description/icon.png,sha256=Vd1HydYBoGCzNfCqxLlch2i2aeCcyxo-uRxWNp6oMbw,14836
|
|
142
|
-
odoo/addons/l10n_br_fiscal/static/description/index.html,sha256=
|
|
133
|
+
odoo/addons/l10n_br_fiscal/static/description/index.html,sha256=PHebpmSq1pnlNR-jxIlYPH5veIf9WftV2MLfSTIILxk,26256
|
|
143
134
|
odoo/addons/l10n_br_fiscal/static/img/fiscal_dashboard.png,sha256=Q0fpqFNqEXh6m6E1aJfzSKV2tQ9lC1Y-ofUt6qxVupc,151668
|
|
144
135
|
odoo/addons/l10n_br_fiscal/static/img/fiscal_line.png,sha256=S4Q4OGSzGnbfm4W5sQVvnD4uUzxS6tbJGT_gs3pB4K0,134276
|
|
145
136
|
odoo/addons/l10n_br_fiscal/static/img/fiscal_operation.png,sha256=2614c1XjxwVznh707e9gujlUXg0ttutKD1ZiSMTqyv8,105871
|
|
@@ -209,7 +200,7 @@ odoo/addons/l10n_br_fiscal/views/uom_uom.xml,sha256=pqq2l0Vd8nz3oJBoe2GERQFMB3I5
|
|
|
209
200
|
odoo/addons/l10n_br_fiscal/wizards/__init__.py,sha256=_sLxjpuJblbtSngjCsnMm7Iur5afF5xLEkAQLu4sy7I,69
|
|
210
201
|
odoo/addons/l10n_br_fiscal/wizards/base_wizard_mixin.py,sha256=-r25us0vdNCSe11Gnf_tyPtN1qq-JKsL-fgWbPGktRo,2856
|
|
211
202
|
odoo/addons/l10n_br_fiscal/wizards/document_status_wizard.py,sha256=KsYj5YWWePO7uk0psBsFdnCL71eLWhcyg7_c7J4G6vA,818
|
|
212
|
-
odoo_addon_l10n_br_fiscal-15.0.2.
|
|
213
|
-
odoo_addon_l10n_br_fiscal-15.0.2.
|
|
214
|
-
odoo_addon_l10n_br_fiscal-15.0.2.
|
|
215
|
-
odoo_addon_l10n_br_fiscal-15.0.2.
|
|
203
|
+
odoo_addon_l10n_br_fiscal-15.0.2.1.0.dist-info/METADATA,sha256=2NyWlDZi9fsYKBMez1Uz55gsDORFAP2KUGJTLr3h13Q,14176
|
|
204
|
+
odoo_addon_l10n_br_fiscal-15.0.2.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
205
|
+
odoo_addon_l10n_br_fiscal-15.0.2.1.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
206
|
+
odoo_addon_l10n_br_fiscal-15.0.2.1.0.dist-info/RECORD,,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2019 Renato Lima - Akretion
|
|
2
|
-
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
|
-
|
|
4
|
-
from odoo import fields, models
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class NCM(models.Model):
|
|
8
|
-
_inherit = "l10n_br_fiscal.ncm"
|
|
9
|
-
|
|
10
|
-
cest_ids = fields.Many2many(
|
|
11
|
-
comodel_name="l10n_br_fiscal.cest",
|
|
12
|
-
relation="fiscal_cest_ncm_rel",
|
|
13
|
-
column1="ncm_id",
|
|
14
|
-
column2="cest_id",
|
|
15
|
-
readonly=True,
|
|
16
|
-
string="CESTs",
|
|
17
|
-
)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2020 Renato Lima - Akretion
|
|
2
|
-
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
|
-
|
|
4
|
-
from odoo import fields, models
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class NCM(models.Model):
|
|
8
|
-
_inherit = "l10n_br_fiscal.ncm"
|
|
9
|
-
|
|
10
|
-
nbm_ids = fields.Many2many(
|
|
11
|
-
comodel_name="l10n_br_fiscal.nbm",
|
|
12
|
-
relation="fiscal_nbm_ncm_rel",
|
|
13
|
-
column1="ncm_id",
|
|
14
|
-
column2="nbm_id",
|
|
15
|
-
readonly=True,
|
|
16
|
-
string="NBMs",
|
|
17
|
-
)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2019 Renato Lima - Akretion
|
|
2
|
-
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
|
-
|
|
4
|
-
from odoo import fields, models
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class NCM(models.Model):
|
|
8
|
-
_inherit = "l10n_br_fiscal.ncm"
|
|
9
|
-
|
|
10
|
-
piscofins_ids = fields.Many2many(
|
|
11
|
-
comodel_name="l10n_br_fiscal.tax.pis.cofins",
|
|
12
|
-
relation="fiscal_pis_cofins_ncm_rel",
|
|
13
|
-
column1="ncm_id",
|
|
14
|
-
column2="piscofins_id",
|
|
15
|
-
readonly=True,
|
|
16
|
-
string="PIS/COFINS",
|
|
17
|
-
)
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2023 Renato Lima - Akretion
|
|
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.exceptions import ValidationError
|
|
6
|
-
|
|
7
|
-
from ..constants.icms import ICMS_TAX_BENEFIT_TYPE
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class TaxDefinitionBenefit(models.Model):
|
|
11
|
-
_inherit = "l10n_br_fiscal.tax.definition"
|
|
12
|
-
|
|
13
|
-
is_benefit = fields.Boolean(
|
|
14
|
-
string="Benefit?",
|
|
15
|
-
readonly=True,
|
|
16
|
-
states={"draft": [("readonly", False)]},
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
code = fields.Char(
|
|
20
|
-
size=8,
|
|
21
|
-
states={"draft": [("readonly", False)]},
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
name = fields.Char(
|
|
25
|
-
states={"draft": [("readonly", False)]},
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
description = fields.Text(
|
|
29
|
-
states={"draft": [("readonly", False)]},
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
benefit_type = fields.Selection(
|
|
33
|
-
selection=ICMS_TAX_BENEFIT_TYPE,
|
|
34
|
-
states={"draft": [("readonly", False)]},
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
# Anexo RICMS
|
|
38
|
-
# Informar o anexo do Regulamento do ICMS.
|
|
39
|
-
|
|
40
|
-
# Artigo
|
|
41
|
-
# Informar o artigo referente ao enquadramento legal da operação
|
|
42
|
-
# ou prestação geradora de crédito acumulado.
|
|
43
|
-
|
|
44
|
-
# Inciso
|
|
45
|
-
# Informar o inciso referente ao enquadramento legal da operação
|
|
46
|
-
# ou prestação geradora de crédito acumulado.
|
|
47
|
-
|
|
48
|
-
# Alínea
|
|
49
|
-
# Alínea referente ao enquadramento legal da operação ou prestação
|
|
50
|
-
# geradora de crédito acumulado.
|
|
51
|
-
|
|
52
|
-
# Parágrafo
|
|
53
|
-
# Informar o parágrafo referente ao enquadramento legal da operação
|
|
54
|
-
# ou prestação geradora de crédito acumulado.
|
|
55
|
-
|
|
56
|
-
# Item RICMS
|
|
57
|
-
# Informar o item do Regulamento do ICMS.
|
|
58
|
-
|
|
59
|
-
# Letra RICMS
|
|
60
|
-
# Informar a letra do Regulamento do ICMS.
|
|
61
|
-
|
|
62
|
-
def _get_search_domain(self, tax_definition):
|
|
63
|
-
"""Create domain to be used in contraints methods"""
|
|
64
|
-
domain = super()._get_search_domain(tax_definition)
|
|
65
|
-
if tax_definition.icms_regulation_id and tax_definition.is_benefit:
|
|
66
|
-
domain.append(
|
|
67
|
-
("is_benefit", "=", tax_definition.is_benefit),
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
if tax_definition.ncm_ids:
|
|
71
|
-
domain.append(
|
|
72
|
-
("ncm_ids", "in", tax_definition.ncm_ids.ids),
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
if tax_definition.cest_ids:
|
|
76
|
-
domain.append(
|
|
77
|
-
("cest_ids", "in", tax_definition.cest_ids.ids),
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
if tax_definition.nbm_ids:
|
|
81
|
-
domain.append(
|
|
82
|
-
("nbm_ids", "in", tax_definition.nbm_ids.ids),
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
if tax_definition.product_ids:
|
|
86
|
-
domain.append(
|
|
87
|
-
("product_ids", "in", tax_definition.product_ids.ids),
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
if tax_definition.ncm_exception:
|
|
91
|
-
domain.append(
|
|
92
|
-
("ncm_exception", "=", tax_definition.ncm_exception),
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
return domain
|
|
96
|
-
|
|
97
|
-
@api.constrains("is_benefit", "code", "benefit_type", "state_from_id")
|
|
98
|
-
def _check_tax_benefit_code(self):
|
|
99
|
-
for record in self:
|
|
100
|
-
if record.is_benefit:
|
|
101
|
-
if record.code:
|
|
102
|
-
if len(record.code) != 8:
|
|
103
|
-
raise ValidationError(
|
|
104
|
-
_("Tax benefit code must be 8 characters!")
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
if record.code[:2].upper() != record.state_from_id.code.upper():
|
|
108
|
-
raise ValidationError(
|
|
109
|
-
_("Tax benefit code must be start with state code!")
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
if record.code[3:4] != record.benefit_type:
|
|
113
|
-
raise ValidationError(
|
|
114
|
-
_(
|
|
115
|
-
"The tax benefit code must contain "
|
|
116
|
-
"the type of benefit!"
|
|
117
|
-
)
|
|
118
|
-
)
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2019 Renato Lima - Akretion
|
|
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.exceptions import ValidationError
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class TaxDefinitionCFOP(models.Model):
|
|
9
|
-
_inherit = "l10n_br_fiscal.tax.definition"
|
|
10
|
-
|
|
11
|
-
cfop_id = fields.Many2one(comodel_name="l10n_br_fiscal.cfop", string="CFOP")
|
|
12
|
-
|
|
13
|
-
@api.constrains("cfop_id")
|
|
14
|
-
def _check_cfop_id(self):
|
|
15
|
-
for record in self:
|
|
16
|
-
if record.cfop_id:
|
|
17
|
-
domain = [
|
|
18
|
-
("id", "!=", record.id),
|
|
19
|
-
("cfop_id", "=", record.cfop_id.id),
|
|
20
|
-
("tax_group_id", "=", record.tax_group_id.id),
|
|
21
|
-
("tax_id", "=", record.tax_id.id),
|
|
22
|
-
]
|
|
23
|
-
|
|
24
|
-
if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
|
|
25
|
-
raise ValidationError(
|
|
26
|
-
_(
|
|
27
|
-
"Tax Definition already exists "
|
|
28
|
-
"for this CFOP and Tax Group !"
|
|
29
|
-
)
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
@api.onchange("cfop_id")
|
|
33
|
-
def _onchange_cfop_id(self):
|
|
34
|
-
if self.cfop_id:
|
|
35
|
-
self.type_in_out = self.cfop_id.type_in_out
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2019 Renato Lima - Akretion
|
|
2
|
-
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
|
3
|
-
|
|
4
|
-
from odoo import _, api, models
|
|
5
|
-
from odoo.exceptions import ValidationError
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class TaxDefinitionCompany(models.Model):
|
|
9
|
-
_inherit = "l10n_br_fiscal.tax.definition"
|
|
10
|
-
|
|
11
|
-
@api.constrains("company_id")
|
|
12
|
-
def _check_company_id(self):
|
|
13
|
-
for record in self:
|
|
14
|
-
if record.company_id:
|
|
15
|
-
domain = [
|
|
16
|
-
("id", "!=", record.id),
|
|
17
|
-
("company_id", "=", record.company_id.id),
|
|
18
|
-
("tax_group_id", "=", record.tax_group_id.id),
|
|
19
|
-
("tax_id", "=", record.tax_id.id),
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
|
|
23
|
-
raise ValidationError(
|
|
24
|
-
_(
|
|
25
|
-
"Tax Definition already exists "
|
|
26
|
-
"for this Company and Tax Group !"
|
|
27
|
-
)
|
|
28
|
-
)
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Copyright (C) 2019 Renato Lima - Akretion
|
|
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.exceptions import ValidationError
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class TaxDefinitionICMS(models.Model):
|
|
9
|
-
_inherit = "l10n_br_fiscal.tax.definition"
|
|
10
|
-
|
|
11
|
-
icms_regulation_id = fields.Many2one(
|
|
12
|
-
comodel_name="l10n_br_fiscal.icms.regulation", string="ICMS Regulation"
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
def _get_search_domain(self, tax_definition):
|
|
16
|
-
"""Create domain to be used in contraints methods"""
|
|
17
|
-
domain = super()._get_search_domain(tax_definition)
|
|
18
|
-
if tax_definition.icms_regulation_id:
|
|
19
|
-
domain.append(
|
|
20
|
-
("icms_regulation_id", "=", tax_definition.icms_regulation_id.id),
|
|
21
|
-
)
|
|
22
|
-
return domain
|
|
23
|
-
|
|
24
|
-
@api.constrains("icms_regulation_id", "state_from_id")
|
|
25
|
-
def _check_icms(self):
|
|
26
|
-
for record in self:
|
|
27
|
-
if record.icms_regulation_id:
|
|
28
|
-
domain = self._get_search_domain(record)
|
|
29
|
-
if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
|
|
30
|
-
raise ValidationError(
|
|
31
|
-
_(
|
|
32
|
-
"Tax Definition already exists "
|
|
33
|
-
"for this ICMS and Tax Group !"
|
|
34
|
-
)
|
|
35
|
-
)
|