[FIX] M2M : values filtering on set()
lp bug: https://launchpad.net/bugs/480301 fixed bzr revid: jvo@tinyerp.com-20091111055028-lza87cnyffvwxy4i
This commit is contained in:
parent
89dc28dfe7
commit
c36ff651f2
|
@ -528,6 +528,8 @@ class many2many(_column):
|
|||
return
|
||||
obj = obj.pool.get(self._obj)
|
||||
for act in values:
|
||||
if not (isinstance(act, list) or isinstance(act, tuple)) or not act:
|
||||
continue
|
||||
if act[0] == 0:
|
||||
idnew = obj.create(cr, user, act[2])
|
||||
cr.execute('insert into '+self._rel+' ('+self._id1+','+self._id2+') values (%s,%s)', (id, idnew))
|
||||
|
|
Loading…
Reference in New Issue