[FIX] orm: add missing context (without the lang attribute to avoid setting translate...
authorMartin Trigaux <mat@openerp.com>
Thu, 9 Jan 2014 15:36:01 +0000 (16:36 +0100)
committerMartin Trigaux <mat@openerp.com>
Thu, 9 Jan 2014 15:36:01 +0000 (16:36 +0100)
bzr revid: mat@openerp.com-20140109153601-13wo9gj5cz6ho3nm

1  2 
openerp/osv/orm.py

@@@ -4180,7 -4168,9 +4180,8 @@@ class BaseModel(object)
                          if not src_trans:
                              src_trans = vals[f]
                              # Inserting value to DB
-                             self.write(cr, user, ids, {f: vals[f]})
 -                            ctx = context.copy()
 -                            ctx['lang'] = False
 -                            self.write(cr, user, ids, {f: vals[f]}, context=ctx)
++                            context_wo_lang = dict(context, lang=None)
++                            self.write(cr, user, ids, {f: vals[f]}, context=context_wo_lang)
                          self.pool.get('ir.translation')._set_ids(cr, user, self._name+','+f, 'model', context['lang'], ids, vals[f], src_trans)