[FIX] Translation - read_string

lp bug: https://launchpad.net/bugs/313340 fixed

bzr revid: stephane@tinyerp.com-20090105152843-pyw6m15gzl4rxt1u
This commit is contained in:
Stephane Wirtel 2009-01-05 16:28:43 +01:00
parent b69f3b074f
commit 6600172e4a
1 changed files with 1 additions and 5 deletions

View File

@ -1133,8 +1133,6 @@ class orm_template(object):
raise _('The copy method is not implemented on this object !')
def read_string(self, cr, uid, id, langs, fields=None, context=None):
if not context:
context = {}
res = {}
res2 = {}
self.pool.get('ir.model.access').check(cr, uid, 'ir.translation', 'read')
@ -1154,14 +1152,12 @@ class orm_template(object):
res2 = self.pool.get(table).read_string(cr, uid, id, langs, cols, context)
for lang in res2:
if lang in res:
res[lang] = {'code': lang}
res[lang]['code'] = lang
for f in res2[lang]:
res[lang][f] = res2[lang][f]
return res
def write_string(self, cr, uid, id, langs, vals, context=None):
if not context:
context = {}
self.pool.get('ir.model.access').check(cr, uid, 'ir.translation', 'write')
for lang in langs:
for field in vals: