[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:
Martin Trigaux 2014-08-21 14:30:10 +02:00
parent 20a99ae129
commit 768b3592c2
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ class ir_model_fields(osv.osv):
column_rename = (obj, (obj._table, item.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!"))
if 'ttype' in vals and vals['ttype'] != item.ttype: