[FIX] base: compare on original module
Introduced at574f4c3dmodel._module has for value of the last module extending the model. This means that, when a module B inherit from a model defined in a module A (e.g to add a field on the model), an external id, tagged with module B, will be created for each field of the model, including the one defined only in A. The intention of the patch at574f4c3dwas to include the automatic fields (i.e. LOG_ACCESS_COLUMNS) into the condition. Without that condition, the fields such as create_date were deleted when upgrading a module (not defined in any module)
This commit is contained in:
@@ -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 (module == model._module or module in field._modules):
|
||||
if module and (module == model._original_module or module in field._modules):
|
||||
to_xmlids.append(name)
|
||||
|
||||
if to_insert:
|
||||
|
||||
Reference in New Issue
Block a user