[FIX] base: wrong model change check
Comparing an id and a browse record will always fail so the exception would have always been raised when changing a model (e.g. updating a module with custom fields).
This commit is contained in:
parent
20a99ae129
commit
768b3592c2
|
@ -440,7 +440,7 @@ class ir_model_fields(osv.osv):
|
||||||
column_rename = (obj, (obj._table, item.name, vals['name']))
|
column_rename = (obj, (obj._table, item.name, vals['name']))
|
||||||
final_name = vals['name']
|
final_name = vals['name']
|
||||||
|
|
||||||
if 'model_id' in vals and vals['model_id'] != item.model_id:
|
if 'model_id' in vals and vals['model_id'] != item.model_id.id:
|
||||||
raise except_orm(_("Error!"), _("Changing the model of a field is forbidden!"))
|
raise except_orm(_("Error!"), _("Changing the model of a field is forbidden!"))
|
||||||
|
|
||||||
if 'ttype' in vals and vals['ttype'] != item.ttype:
|
if 'ttype' in vals and vals['ttype'] != item.ttype:
|
||||||
|
|
Loading…
Reference in New Issue