[IMP] orm translations: improve variable names

bzr revid: rco@openerp.com-20120702072424-n402jjf4vfi2357p
This commit is contained in:
Raphael Collet
2012-07-02 09:24:24 +02:00
parent 03e56ea7b6
commit 8e36512e97
+6 -7
View File
@@ -1755,13 +1755,12 @@ class BaseModel(object):
if trans:
node.set('string', trans)
for translatable in ('confirm', 'sum', 'help', 'placeholder'):
attr = node.get(translatable)
if attr:
translation = self.pool['ir.translation']._get_source(
cr, user, self._name, 'view', context['lang'], attr)
if translation:
node.set(translatable, translation)
for attr_name in ('confirm', 'sum', 'help', 'placeholder'):
attr_value = node.get(attr_name)
if attr_value:
trans = self.pool.get('ir.translation')._get_source(cr, user, self._name, 'view', context['lang'], attr_value)
if trans:
node.set(attr_name, trans)
for f in node:
if children or (node.tag == 'field' and f.tag in ('filter','separator')):