From 932cee92170bf1455d66f28f720a8841c9cd8ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 30 Dec 2008 14:11:38 +0100 Subject: [PATCH] Add missing translation of confirm attribute for issue706 --- trytond/osv/orm.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index b6c98f2d16..271e8c6384 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -2120,18 +2120,13 @@ class ORM(object): # translate view if ('language' in context) and not result: - if element.get('string'): - trans = translation_obj._get_source(cursor, - self._name, 'view', context['language'], - element.get('string')) - if trans: - element.set('string', trans) - if element.get('sum'): - trans = translation_obj._get_source(cursor, - self._name, 'view', context['language'], - element.get('sum')) - if trans: - element.set('sum', trans) + for attr in ('string', 'sum', 'confirm'): + if element.get(attr): + trans = translation_obj._get_source(cursor, + self._name, 'view', context['language'], + element.get(attr)) + if trans: + element.set(attr, trans) if element.tag in ('form', 'tree', 'graph'): value = ''