projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89dc28d
)
[FIX] M2M : values filtering on set()
author
Jay (Open ERP)
<jvo@tinyerp.com>
Wed, 11 Nov 2009 05:50:28 +0000
(11:20 +0530)
committer
Jay (Open ERP)
<jvo@tinyerp.com>
Wed, 11 Nov 2009 05:50:28 +0000
(11:20 +0530)
lp bug: https://launchpad.net/bugs/480301 fixed
bzr revid: jvo@tinyerp.com-
20091111055028
-lza87cnyffvwxy4i
bin/osv/fields.py
patch
|
blob
|
history
diff --git
a/bin/osv/fields.py
b/bin/osv/fields.py
index
cde2a0e
..
dc5e2a9
100644
(file)
--- a/
bin/osv/fields.py
+++ b/
bin/osv/fields.py
@@
-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))