From 87c09b8ebcea950b628e5c7adfe847b9f8b6c031 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 14 Mar 2018 15:47:20 +0100 Subject: [PATCH] [FIX] account: false complete_tax_set tax default When setting a chart of account on a company, we have default taxes from the default chart of account different from chosen one. But if a chart of account is chosen, it should override them in the onchange_chart_template_id function. This works as expected for a truthy complete_tax_set chart of account template, but not for a falsy complete_tax_set chart of account template. The complete_tax_set indicates that we don't want to set default taxes and the user should do it or modify the given tax rates himself. opw-1824751 closes #23655 --- addons/account/models/chart_template.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py index 7df579a87e1..428617a5489 100644 --- a/addons/account/models/chart_template.py +++ b/addons/account/models/chart_template.py @@ -740,6 +740,9 @@ class WizardMultiChartsAccounts(models.TransientModel): res.setdefault('domain', {}) res['domain']['sale_tax_id'] = repr(sale_tax_domain) res['domain']['purchase_tax_id'] = repr(purchase_tax_domain) + else: + self.sale_tax_id = False + self.purchase_tax_id = False if self.chart_template_id.transfer_account_id: self.transfer_account_id = self.chart_template_id.transfer_account_id.id if self.chart_template_id.code_digits: