[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.
This commit is contained in:
Raphael Collet
2018-09-27 15:29:53 +02:00
parent 099092ab81
commit 574f4c3deb
+1 -1
View File
@@ -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: