odoo-addon-l10n-br-fiscal 16.0.2.0.0.2__py3-none-any.whl → 16.0.2.2.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.

Files changed (26) hide show
  1. odoo/addons/l10n_br_fiscal/README.rst +1 -1
  2. odoo/addons/l10n_br_fiscal/__manifest__.py +1 -1
  3. odoo/addons/l10n_br_fiscal/i18n/l10n_br_fiscal.pot +8 -8
  4. odoo/addons/l10n_br_fiscal/i18n/pt_BR.po +312 -858
  5. odoo/addons/l10n_br_fiscal/models/__init__.py +5 -14
  6. odoo/addons/l10n_br_fiscal/models/ncm.py +27 -0
  7. odoo/addons/l10n_br_fiscal/models/tax_definition.py +189 -1
  8. odoo/addons/l10n_br_fiscal/static/description/index.html +1 -1
  9. {odoo_addon_l10n_br_fiscal-16.0.2.0.0.2.dist-info → odoo_addon_l10n_br_fiscal-16.0.2.2.0.dist-info}/METADATA +2 -2
  10. {odoo_addon_l10n_br_fiscal-16.0.2.0.0.2.dist-info → odoo_addon_l10n_br_fiscal-16.0.2.2.0.dist-info}/RECORD +17 -26
  11. odoo/addons/l10n_br_fiscal/models/ncm_cest.py +0 -18
  12. odoo/addons/l10n_br_fiscal/models/ncm_nbm.py +0 -18
  13. odoo/addons/l10n_br_fiscal/models/ncm_tax_pis_cofins.py +0 -18
  14. odoo/addons/l10n_br_fiscal/models/tax_definition_benefit.py +0 -119
  15. odoo/addons/l10n_br_fiscal/models/tax_definition_cfop.py +0 -36
  16. odoo/addons/l10n_br_fiscal/models/tax_definition_company.py +0 -29
  17. odoo/addons/l10n_br_fiscal/models/tax_definition_icms.py +0 -36
  18. odoo/addons/l10n_br_fiscal/models/tax_definition_operation_line.py +0 -37
  19. odoo/addons/l10n_br_fiscal/models/tax_definition_partner_profile.py +0 -33
  20. /odoo/addons/l10n_br_fiscal/models/{document_fiscal_line_mixin.py → document_line_mixin.py} +0 -0
  21. /odoo/addons/l10n_br_fiscal/models/{document_fiscal_line_mixin_methods.py → document_line_mixin_methods.py} +0 -0
  22. /odoo/addons/l10n_br_fiscal/models/{document_fiscal_mixin.py → document_mixin.py} +0 -0
  23. /odoo/addons/l10n_br_fiscal/models/{document_fiscal_mixin_fields.py → document_mixin_fields.py} +0 -0
  24. /odoo/addons/l10n_br_fiscal/models/{document_fiscal_mixin_methods.py → document_mixin_methods.py} +0 -0
  25. {odoo_addon_l10n_br_fiscal-16.0.2.0.0.2.dist-info → odoo_addon_l10n_br_fiscal-16.0.2.2.0.dist-info}/WHEEL +0 -0
  26. {odoo_addon_l10n_br_fiscal-16.0.2.0.0.2.dist-info → odoo_addon_l10n_br_fiscal-16.0.2.2.0.dist-info}/top_level.txt +0 -0
@@ -1,29 +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
- # pylint: disable=consider-merging-classes-inherited
9
- class TaxDefinitionCompany(models.Model):
10
- _inherit = "l10n_br_fiscal.tax.definition"
11
-
12
- @api.constrains("company_id")
13
- def _check_company_id(self):
14
- for record in self:
15
- if record.company_id:
16
- domain = [
17
- ("id", "!=", record.id),
18
- ("company_id", "=", record.company_id.id),
19
- ("tax_group_id", "=", record.tax_group_id.id),
20
- ("tax_id", "=", record.tax_id.id),
21
- ]
22
-
23
- if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
24
- raise ValidationError(
25
- _(
26
- "Tax Definition already exists "
27
- "for this Company and Tax Group !"
28
- )
29
- )
@@ -1,36 +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
- # pylint: disable=consider-merging-classes-inherited
9
- class TaxDefinitionICMS(models.Model):
10
- _inherit = "l10n_br_fiscal.tax.definition"
11
-
12
- icms_regulation_id = fields.Many2one(
13
- comodel_name="l10n_br_fiscal.icms.regulation", string="ICMS Regulation"
14
- )
15
-
16
- def _get_search_domain(self, tax_definition):
17
- """Create domain to be used in contraints methods"""
18
- domain = super()._get_search_domain(tax_definition)
19
- if tax_definition.icms_regulation_id:
20
- domain.append(
21
- ("icms_regulation_id", "=", tax_definition.icms_regulation_id.id),
22
- )
23
- return domain
24
-
25
- @api.constrains("icms_regulation_id", "state_from_id")
26
- def _check_icms(self):
27
- for record in self:
28
- if record.icms_regulation_id:
29
- domain = self._get_search_domain(record)
30
- if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
31
- raise ValidationError(
32
- _(
33
- "Tax Definition already exists "
34
- "for this ICMS and Tax Group !"
35
- )
36
- )
@@ -1,37 +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
- # pylint: disable=consider-merging-classes-inherited
9
- class TaxDefinitionOperationLine(models.Model):
10
- _inherit = "l10n_br_fiscal.tax.definition"
11
-
12
- fiscal_operation_line_id = fields.Many2one(
13
- comodel_name="l10n_br_fiscal.operation.line", string="Operation Line"
14
- )
15
-
16
- @api.constrains("fiscal_operation_line_id")
17
- def _check_fiscal_operation_line_id(self):
18
- for record in self:
19
- if record.fiscal_operation_line_id:
20
- domain = [
21
- ("id", "!=", record.id),
22
- (
23
- "fiscal_operation_line_id",
24
- "=",
25
- record.fiscal_operation_line_id.id,
26
- ),
27
- ("tax_group_id", "=", record.tax_group_id.id),
28
- ("tax_id", "=", record.tax_id.id),
29
- ]
30
-
31
- if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
32
- raise ValidationError(
33
- _(
34
- "Tax Definition already exists "
35
- "for this Operation Line and Tax Group !"
36
- )
37
- )
@@ -1,33 +0,0 @@
1
- # Copyright (C) 2020 Luis Felipe Mileo - KMEE
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
- # pylint: disable=consider-merging-classes-inherited
9
- class TaxDefinitionPartnerProfile(models.Model):
10
- _inherit = "l10n_br_fiscal.tax.definition"
11
-
12
- fiscal_profile_id = fields.Many2one(
13
- comodel_name="l10n_br_fiscal.partner.profile", string="Partner Profile"
14
- )
15
-
16
- @api.constrains("fiscal_profile_id")
17
- def _check_fiscal_profile_id(self):
18
- for record in self:
19
- if record.fiscal_profile_id:
20
- domain = [
21
- ("id", "!=", record.id),
22
- ("fiscal_profile_id", "=", record.fiscal_profile_id.id),
23
- ("tax_group_id", "=", record.tax_group_id.id),
24
- ("tax_id", "=", record.tax_id.id),
25
- ]
26
-
27
- if record.env["l10n_br_fiscal.tax.definition"].search_count(domain):
28
- raise ValidationError(
29
- _(
30
- "Tax Definition already exists "
31
- "for this Partner Profile and Tax Group !"
32
- )
33
- )