From ee5eb8095165df7a0d8ef66862eb523f6a022f20 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 20 Jun 2011 14:06:00 +0200 Subject: [PATCH] [FIX] orm/fields_view_get: translate correctly confirm/sum/help: - view_header_get can override the string attribute but should not prevent the translation of the other attributes. - the problem goes back to revno 319 when there was only a string and sum was added. bzr revid: vmt@openerp.com-20110620120600-lu9csho8ws2habfp --- openerp/osv/orm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 55236b7fb90..7c97554738c 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -1421,8 +1421,8 @@ class orm_template(object): check_group(node) # translate view - if ('lang' in context) and not result: - if node.get('string'): + if 'lang' in context: + if node.get('string') and not result: trans = self.pool.get('ir.translation')._get_source(cr, user, self._name, 'view', context['lang'], node.get('string')) if trans == node.get('string') and ('base_model_name' in context): # If translation is same as source, perhaps we'd have more luck with the alternative model name