Changing the model of a field is forbidden! error even if model is same

Bug #1158227 reported by Ruchir Shukla(BizzAppDev)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Medium
OpenERP's Framework R&D

Bug Description

when trying to write ir.model.field a record name startswith 'x_' and state = 'manual'
it is checking old model and new model provided.

if 'model_id' in vals and vals['model_id'] != item.model_id:
    raise except_orm(_("Error!"), _("Changing the model of a field is forbidden!"))

here always Condition is True Even is Old model and new model is Same .

the condition should be

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!"))

Please find the attached patch .

tags: removed: fieldmanual
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.