Workaround broken set request in many2many.
bzr revid: p_christ@hol.gr-20090114080217-y62dhs9bnge9aqge
This commit is contained in:
@@ -515,6 +515,9 @@ class many2many(_column):
|
||||
return
|
||||
obj = obj.pool.get(self._obj)
|
||||
for act in values:
|
||||
if not isinstance(act,tuple):
|
||||
print("incorrect values passed in many2many.set:",values)
|
||||
return
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user