[MERGE] [IMP] report_webkit: avoid using same src value for two different values with fallback
bzr revid: mat@openerp.com-20130611141016-nbi737zejyc003fd
This commit is contained in:
commit
66eb2e7f3f
|
@ -191,6 +191,11 @@ class WebKitParser(report_sxw):
|
|||
def translate_call(self, src):
|
||||
"""Translate String."""
|
||||
ir_translation = self.pool.get('ir.translation')
|
||||
name = self.tmpl and 'addons/' + self.tmpl or None
|
||||
res = ir_translation._get_source(self.parser_instance.cr, self.parser_instance.uid,
|
||||
name, 'report', self.parser_instance.localcontext.get('lang', 'en_US'), src)
|
||||
if res == src:
|
||||
# no translation defined, fallback on None (backward compatibility)
|
||||
res = ir_translation._get_source(self.parser_instance.cr, self.parser_instance.uid,
|
||||
None, 'report', self.parser_instance.localcontext.get('lang', 'en_US'), src)
|
||||
if not res :
|
||||
|
|
Loading…
Reference in New Issue