[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. (0870357cc4)
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) <bib@odoo.com>
This commit is contained in:
Gauthier Wala (gawa)
2024-01-09 23:04:43 +00:00
parent 6633a1102f
commit 9bce766bed
3 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -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,
-2
View File
@@ -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',
},
}
+2 -2
View File
@@ -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',
},
}