From 82a3dca2d76b422e5c7020727521966080f9e676 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Fri, 24 Jun 2011 16:01:03 +0200 Subject: [PATCH] [FIX] fields: pass around the context in the create case of the many2many (thankks to rco). bzr revid: vmt@openerp.com-20110624140103-z7t3c029mc4uq5wu --- openerp/osv/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index e28f7b2b02d..3f46fc5a5a7 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -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)