[FIX] account_chart_update: Do not update the xmlid if the original object has no xmlid

This commit is contained in:
Enric Tobella
2021-05-19 12:41:24 +02:00
parent f732af75eb
commit 138dde1bda

View File

@@ -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),