diff --git a/account_ecotax/README.rst b/account_ecotax/README.rst index 93f5db377..0c2e1e61e 100644 --- a/account_ecotax/README.rst +++ b/account_ecotax/README.rst @@ -115,6 +115,14 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. +.. |maintainer-mourad-ehm| image:: https://github.com/mourad-ehm.png?size=40px + :target: https://github.com/mourad-ehm + :alt: mourad-ehm + +Current `maintainer `__: + +|maintainer-mourad-ehm| + This module is part of the `OCA/account-fiscal-rule `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_ecotax/__manifest__.py b/account_ecotax/__manifest__.py index 3c3981ae0..01771a9f3 100644 --- a/account_ecotax/__manifest__.py +++ b/account_ecotax/__manifest__.py @@ -10,6 +10,7 @@ "website": "https://github.com/OCA/account-fiscal-rule", "category": "Localization/Account Taxes", "license": "AGPL-3", + "maintainers": ["mourad-ehm"], "depends": [ "account", "account_tax_python", diff --git a/account_ecotax/models/account_tax.py b/account_ecotax/models/account_tax.py index d0e84dbf6..1d9bea8a2 100644 --- a/account_ecotax/models/account_tax.py +++ b/account_ecotax/models/account_tax.py @@ -28,5 +28,5 @@ def onchange_is_ecotax(self): # partner: res.partner object or None # for weight based ecotax # result = product.weight_based_ecotax or 0.0 -result = product.ecotax_amount or 0.0 +result = product.fixed_ecotax or 0.0 """ diff --git a/account_ecotax/models/product_product.py b/account_ecotax/models/product_product.py index cbd3bc1ed..fa108141e 100644 --- a/account_ecotax/models/product_product.py +++ b/account_ecotax/models/product_product.py @@ -31,18 +31,18 @@ class ProductProduct(models.Model): ecotax_amount = fields.Float( digits="Ecotax", compute="_compute_product_ecotax", - help="Ecotax Amount computed form all ecotax line classification", store=True, + help="Ecotax Amount computed form all ecotax line classification", ) fixed_ecotax = fields.Float( compute="_compute_product_ecotax", + store=True, help="Fixed ecotax of the Ecotax Classification", ) weight_based_ecotax = fields.Float( compute="_compute_product_ecotax", - help="Ecotax value :\n" - "product weight * ecotax coef of " - "Ecotax Classification", + store=True, + help="Ecotax value :\n" "product weight * ecotax coef of Ecotax Classification", ) @api.depends("ecotax_line_product_ids", "additional_ecotax_line_product_ids") @@ -84,7 +84,6 @@ def _compute_product_ecotax(self): weight_based_ecotax += ecotaxline_prod.amount else: fixed_ecotax += ecotaxline_prod.amount - amount_ecotax += ecotaxline_prod.amount product.fixed_ecotax = fixed_ecotax product.weight_based_ecotax = weight_based_ecotax diff --git a/account_ecotax/models/product_template.py b/account_ecotax/models/product_template.py index 13ff903ff..4eed3da3d 100644 --- a/account_ecotax/models/product_template.py +++ b/account_ecotax/models/product_template.py @@ -23,12 +23,12 @@ class ProductTemplate(models.Model): fixed_ecotax = fields.Float( compute="_compute_ecotax", help="Fixed ecotax of the Ecotax Classification", + store=True, ) weight_based_ecotax = fields.Float( compute="_compute_ecotax", - help="Ecotax value :\n" - "product weight * ecotax coef of " - "Ecotax Classification", + help="Ecotax value :\nproduct weight * ecotax coef of Ecotax Classification", + store=True, ) @api.depends( @@ -50,7 +50,6 @@ def _compute_ecotax(self): weight_based_ecotax += ecotaxline_prod.amount else: fixed_ecotax += ecotaxline_prod.amount - amount_ecotax += ecotaxline_prod.amount tmpl.fixed_ecotax = fixed_ecotax tmpl.weight_based_ecotax = weight_based_ecotax diff --git a/account_ecotax/static/description/index.html b/account_ecotax/static/description/index.html index 07e067959..b257d7c7c 100644 --- a/account_ecotax/static/description/index.html +++ b/account_ecotax/static/description/index.html @@ -444,6 +444,8 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

+

Current maintainer:

+

mourad-ehm

This module is part of the OCA/account-fiscal-rule project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_ecotax/tests/test_ecotax.py b/account_ecotax/tests/test_ecotax.py index c002ab77c..86d88ddd5 100644 --- a/account_ecotax/tests/test_ecotax.py +++ b/account_ecotax/tests/test_ecotax.py @@ -14,7 +14,7 @@ @tagged("-at_install", "post_install") class TestInvoiceEcotaxe(AccountTestInvoicingCommon): @classmethod - def setUpClass(cls, chart_template_ref="l10n_fr.l10n_fr_pcg_chart_template"): + def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref) cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))