From 6600172e4aacbe9e337eee2dafc7797488e420fe Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Mon, 5 Jan 2009 16:28:43 +0100 Subject: [PATCH] [FIX] Translation - read_string lp bug: https://launchpad.net/bugs/313340 fixed bzr revid: stephane@tinyerp.com-20090105152843-pyw6m15gzl4rxt1u --- bin/osv/orm.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 6ed05ff148a..8caef262f03 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -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: