From 138dde1bda8362984e93a1860cb0c3a473562ffd Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Wed, 19 May 2021 12:41:24 +0200 Subject: [PATCH] [FIX] account_chart_update: Do not update the xmlid if the original object has no xmlid --- account_chart_update/wizard/wizard_chart_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index ea506d436..90c7d7b99 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -656,7 +656,7 @@ class WizardUpdateChartsAccounts(models.TransientModel): ('res_id', '=', template.id), ]) new_xml_id = "%d_%s" % (self.company_id.id, template_xmlid.name) - return not ir_model_data.search([ + return template_xmlid and not ir_model_data.search([ ('res_id', '=', real_obj.id), ('model', '=', real_obj._name), ('module', '=', template_xmlid.module),