[imp] small bug in o2m 5 improvement

bzr revid: nicolas.vanhoren@openerp.com-20110630100404-5tkdsafuf9ju4xcw
This commit is contained in:
niv-openerp 2011-06-30 12:04:04 +02:00
parent 350de710c4
commit 4dcc76071e
1 changed files with 1 additions and 1 deletions

View File

@ -529,7 +529,7 @@ class one2many(_column):
assert reverse_rel, 'Trying to unlink the content of a o2m but the pointed object does not have a m2o'
# if the pointed object has on delete cascade, just delete it
if reverse_rel.column.ondelete == "cascade":
obj.unlink(cr, user, obj.search(cr, user, [(self._fields_id,'=',id)], context), context)
obj.unlink(cr, user, obj.search(cr, user, [(self._fields_id,'=',id)], context=context), context=context)
else:
cr.execute('update '+_table+' set '+self._fields_id+'=null where '+self._fields_id+'=%s', (id,))
elif act[0] == 6: