[FIX] orm: add missing context (without the lang attribute to avoid setting translated values) in write call.

bzr revid: mat@openerp.com-20140109153601-13wo9gj5cz6ho3nm
This commit is contained in:
Martin Trigaux 2014-01-09 16:36:01 +01:00
commit 3fb75a44c8
1 changed files with 2 additions and 1 deletions

View File

@ -4180,7 +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]})
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)