Missing instanciation of Transaction for issue1656

This commit is contained in:
Cédric Krier committed 2010-08-24 12:20:11 +02:00
1 parent e186d5b76d
commit 3a9ae031b8
1 file changed
+1 -1
+1 -1
View File
@@ -60,7 +60,7 @@ class Lang(ModelSQL, ModelView, Cacheable):
res = super(Lang, self).read(ids, fields_names=fields_names)
if (Transaction().context.get('translate_name')
and (not fields_names or 'name' in fields_names)):
with Transaction.set_context(
with Transaction().set_context(
language=self.default_code(),
translate_name=False):
res2 = self.read(ids, fields_names=['id', 'code', 'name'])