[FIX] ir.model filter out link that occurs when using the ir.model web form view

lp bug: https://launchpad.net/bugs/912769 fixed

bzr revid: al@openerp.com-20120208221706-o45t6h3zgmz3ezny
This commit is contained in:
Antony Lesuisse 2012-02-08 23:17:06 +01:00
parent 2cd26d3763
commit 94145b2982
1 changed files with 4 additions and 0 deletions

View File

@ -146,6 +146,10 @@ class ir_model(osv.osv):
def write(self, cr, user, ids, vals, context=None):
if context:
context.pop('__last_update', None)
# Filter out operations 4 link from field id, because openerp-web
# always write (4,id,False) even for non dirty items
if 'field_id' in vals:
vals['field_id'] = [op for op in vals['field_id'] if op[0] != 4]
return super(ir_model,self).write(cr, user, ids, vals, context)
def create(self, cr, user, vals, context=None):