From 9bce766bedc9c94644e84b5ef6cc59096f00fc6e Mon Sep 17 00:00:00 2001 From: "Gauthier Wala (gawa)" Date: Mon, 18 Dec 2023 10:58:53 +0100 Subject: [PATCH] [FIX] l10n_{ch,ee}: wrong account_sale_tax_id on template Instead of replacing the default taxes, the key has been duplicated in the dict. (0870357cc48ba0a7f7ce18ac32ecb677ee579498) So, instead of assigning the new tax, it is overriden by the old keys. So, the old tax is still the one referenced in the template. l10n_ee: the old tax has been deactivated, and the default_tax hasn't been changed. Added the tag to the test so it will be seen on merge next time. Linked to runbot error 52792 closes odoo/odoo#146652 Signed-off-by: Brice Bartoletti (bib) --- addons/account/tests/test_product.py | 4 ++-- addons/l10n_ch/models/template_ch.py | 2 -- addons/l10n_ee/models/template_ee.py | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/addons/account/tests/test_product.py b/addons/account/tests/test_product.py index 4d3e3c4872c..513831b1cf8 100644 --- a/addons/account/tests/test_product.py +++ b/addons/account/tests/test_product.py @@ -4,7 +4,7 @@ from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged -@tagged('post_install', '-at_install') +@tagged('post_install', 'post_install_l10n', '-at_install') class TestProduct(AccountTestInvoicingCommon): def test_multi_company_product_tax(self): @@ -21,7 +21,7 @@ class TestProduct(AccountTestInvoicingCommon): self.assertRecordValues(product_without_company.sudo(), [{ 'taxes_id': companies.account_sale_tax_id.ids, 'supplier_taxes_id': companies.account_purchase_tax_id.ids, - }]) + }]) # Take care that inactive default taxes won't be shown on the product # Product should have only the default tax of the company it belongs to. self.assertRecordValues(product_with_company.sudo(), [{ 'taxes_id': self.company_data['company'].account_sale_tax_id.ids, diff --git a/addons/l10n_ch/models/template_ch.py b/addons/l10n_ch/models/template_ch.py index 22a139aec41..72185d172bf 100644 --- a/addons/l10n_ch/models/template_ch.py +++ b/addons/l10n_ch/models/template_ch.py @@ -37,7 +37,5 @@ class AccountChartTemplate(models.AbstractModel): 'account_purchase_tax_id': 'vat_purchase_81', 'external_report_layout_id': 'l10n_din5008.external_layout_din5008', 'paperformat_id': 'l10n_din5008.paperformat_euro_din', - 'account_sale_tax_id': 'vat_77', - 'account_purchase_tax_id': 'vat_77_purchase', }, } diff --git a/addons/l10n_ee/models/template_ee.py b/addons/l10n_ee/models/template_ee.py index 44ac4837fbc..cbb21a863ff 100644 --- a/addons/l10n_ee/models/template_ee.py +++ b/addons/l10n_ee/models/template_ee.py @@ -32,7 +32,7 @@ class AccountChartTemplate(models.AbstractModel): 'account_journal_early_pay_discount_gain_account_id': 'l10n_ee_430', 'default_cash_difference_income_account_id': 'l10n_ee_420', 'default_cash_difference_expense_account_id': 'l10n_ee_671', - 'account_sale_tax_id': 'l10n_ee_vat_out_20_g', - 'account_purchase_tax_id': 'l10n_ee_vat_in_20_g', + 'account_sale_tax_id': 'l10n_ee_vat_out_22_g', + 'account_purchase_tax_id': 'l10n_ee_vat_in_22_g', }, }