[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 Pedro M. Baeza
parent 5e9c792879
commit 66f3db4adb
2 changed files with 2 additions and 2 deletions

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