From 53fa385d084be92c5c63e66a58000062ad785653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Mon, 9 Jul 2018 17:53:57 +0200 Subject: [PATCH] account_chart_update: copy inactive tax templates too In v10, tax templates have an active flag. It is useful to copy them too, letting the user select which one he wants to activate in it's instance. --- account_chart_update/wizard/wizard_chart_update.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index bf16b05ee..70a0a7b97 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -462,7 +462,8 @@ class WizardUpdateChartsAccounts(models.TransientModel): found_taxes_ids = [] self.tax_ids.unlink() # Search for changes between template and real tax - for template in self.chart_template_ids.mapped("tax_template_ids"): + for template in self.chart_template_ids.\ + with_context(active_test=False).mapped("tax_template_ids"): # Check if the template matches a real tax tax_id = self.find_tax_by_templates(template) if not tax_id: