[FIX] fields: pass around the context in the create case of the many2many (thankks to rco).

bzr revid: vmt@openerp.com-20110624140103-z7t3c029mc4uq5wu
This commit is contained in:
Vo Minh Thu 2011-06-24 16:01:03 +02:00
parent 3662105c50
commit 82a3dca2d7
1 changed files with 1 additions and 1 deletions

View File

@ -632,7 +632,7 @@ class many2many(_column):
if not (isinstance(act, list) or isinstance(act, tuple)) or not act:
continue
if act[0] == 0:
idnew = obj.create(cr, user, act[2])
idnew = obj.create(cr, user, act[2], context=context)
cr.execute('insert into '+self._rel+' ('+self._id1+','+self._id2+') values (%s,%s)', (id, idnew))
elif act[0] == 1:
obj.write(cr, user, [act[1]], act[2], context=context)