From 14dbb57c6b960f6a4a9c9e8c062ca9f0f596ec1d Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Mon, 14 Oct 2024 08:27:08 +0200 Subject: [PATCH] [MIG] account_ecotax_sale: Migration to 17.0 --- account_ecotax_sale/__manifest__.py | 2 +- account_ecotax_sale/models/sale_order_line.py | 3 ++- account_ecotax_sale/tests/test_sale_ecotax.py | 2 +- account_ecotax_sale/views/sale_view.xml | 12 ++++-------- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/account_ecotax_sale/__manifest__.py b/account_ecotax_sale/__manifest__.py index ddaaaf2e0..e238ecbcc 100644 --- a/account_ecotax_sale/__manifest__.py +++ b/account_ecotax_sale/__manifest__.py @@ -4,7 +4,7 @@ { "name": "sale Ecotax Management", "summary": "Sale Ecotaxe", - "version": "16.0.2.0.0", + "version": "17.0.1.0.0", "author": "Akretion,Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-fiscal-rule", "category": "Localization/Account Taxes", diff --git a/account_ecotax_sale/models/sale_order_line.py b/account_ecotax_sale/models/sale_order_line.py index ad99b2150..cf4b42ca6 100644 --- a/account_ecotax_sale/models/sale_order_line.py +++ b/account_ecotax_sale/models/sale_order_line.py @@ -54,9 +54,10 @@ def _compute_ecotax(self): @api.depends("product_id", "company_id") def _compute_tax_id(self): - super()._compute_tax_id() + res = super()._compute_tax_id() for line in self: line.tax_id |= line._get_computed_ecotaxes() + return res def _get_computed_ecotaxes(self): self.ensure_one() diff --git a/account_ecotax_sale/tests/test_sale_ecotax.py b/account_ecotax_sale/tests/test_sale_ecotax.py index d1cbc734f..10ba95cad 100644 --- a/account_ecotax_sale/tests/test_sale_ecotax.py +++ b/account_ecotax_sale/tests/test_sale_ecotax.py @@ -11,7 +11,7 @@ class TestsaleEcotax(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref="l10n_fr.l10n_fr_pcg_chart_template"): - super(TestsaleEcotax, cls).setUpClass(chart_template_ref) + super().setUpClass(chart_template_ref) cls.ecotax_classification = cls.env["account.ecotax.classification"] cls.ecotax_classification1 = cls.ecotax_classification.create( diff --git a/account_ecotax_sale/views/sale_view.xml b/account_ecotax_sale/views/sale_view.xml index dfa4bd439..6228edfc7 100644 --- a/account_ecotax_sale/views/sale_view.xml +++ b/account_ecotax_sale/views/sale_view.xml @@ -60,7 +60,7 @@ - + -