Skip to content
Snippets Groups Projects
Commit 574f4c3d authored by Raphael Collet's avatar Raphael Collet
Browse files

[FIX] base: update XML ids of automatic fields

Upon module upgrade, automatic fields are removed from `ir.model.fields`.  This
is because those fields do not belong to the module of their model.  Fix the
condition to update their XML id when the module of their model is upgraded.
parent 099092ab
No related branches found
No related tags found
No related merge requests found
......@@ -818,7 +818,7 @@ class IrModelFields(models.Model):
keys = [key for key in new_vals if old_vals[key] != new_vals[key]]
self.pool.post_init(record.modified, keys)
old_vals.update(new_vals)
if module and (old_vals is None or module in field._modules):
if module and (module == model._module or module in field._modules):
to_xmlids.append(name)
if to_insert:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment