ORM: fix bug at orm.copy_data(), would reset context[lang]

Thanks to Dr. Gassauer that made me revise this code.

bzr revid: p_christ@hol.gr-20101116150025-ssyiix1c72t04fbk
This commit is contained in:
P. Christeas 2010-11-16 17:00:25 +02:00
parent 329bfb0d18
commit 63d562de39
1 changed files with 1 additions and 1 deletions

View File

@ -4096,7 +4096,7 @@ class orm(orm_template):
else:
default['state'] = self._defaults['state']
context_wo_lang = context
context_wo_lang = context.copy()
if 'lang' in context:
del context_wo_lang['lang']
data = self.read(cr, uid, [id], context=context_wo_lang)[0]