diff --git a/bin/osv/fields.py b/bin/osv/fields.py index 28f021d8954..433a25581ff 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -469,7 +469,7 @@ class one2many(_column): elif act[0] == 6: obj.write(cr, user, act[2], {self._fields_id:id}, context=context or {}) ids2 = act[2] or [0] - cr.execute('select id from '+_table+' where '+self._fields_id+'=%s and id <> ALL %s', (id,tuple(ids2))) + cr.execute('select id from '+_table+' where '+self._fields_id+'=%s and id <> ALL (%s)', (id,ids2)) ids3 = map(lambda x:x[0], cr.fetchall()) obj.write(cr, user, ids3, {self._fields_id:False}, context=context or {}) return result