[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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user