[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
This commit is contained in:
Vo Minh Thu
2011-06-20 14:06:00 +02:00
parent 53f594eb67
commit ee5eb80951
+2 -2
View File
@@ -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