diff --git a/addons/report_webkit/webkit_report.py b/addons/report_webkit/webkit_report.py index 8bf7331af5a..56f361370f2 100644 --- a/addons/report_webkit/webkit_report.py +++ b/addons/report_webkit/webkit_report.py @@ -191,8 +191,13 @@ 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, - None, 'report', self.parser_instance.localcontext.get('lang', 'en_US'), src) + 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 : return src return res