2
0

[FIX] account_chart_update: ignore template fields that do not exist in real

This commit is contained in:
Luc De Meyer 2020-10-31 17:19:19 +01:00 committed by Luis J. Salvatierra
parent d4094eff87
commit eefe80e215
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
{
"name": "Detect changes and update the Account Chart from a template",
"summary": "Wizard to update a company's account chart from a template",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"author": "Tecnativa, BCIM, Okia, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-tools",
"depends": ["account"],

View File

@ -658,7 +658,7 @@ class WizardUpdateChartsAccounts(models.TransientModel):
}
to_include = template_field_mapping[template._name].mapped("name")
for key, field in template._fields.items():
if key in ignore or key not in to_include:
if key in ignore or key not in to_include or not hasattr(real, key):
continue
expected = None
# Translate template records to reals for comparison