Fixed calling private method code changed from service to pooler
bzr revid: hda@tinyerp.com-20100330094617-9njeiguur4hnupit
This commit is contained in:
@@ -138,7 +138,8 @@ class report_rml(report_int):
|
||||
def create_rml(self, cr, xml, uid, context=None):
|
||||
if not context:
|
||||
context={}
|
||||
service = netsvc.LocalService("object_proxy")
|
||||
pool = pooler.get_pool(cr.dbname)
|
||||
ir_translation_obj = pool.get('ir.translation')
|
||||
|
||||
# In some case we might not use xsl ...
|
||||
if not self.xsl:
|
||||
@@ -159,9 +160,7 @@ class report_rml(report_int):
|
||||
|
||||
def translate(doc, lang):
|
||||
for node in doc.xpath('//*[@t]'):
|
||||
translation = service.execute(
|
||||
cr.dbname, uid, 'ir.translation', '_get_source',
|
||||
self.name2, 'xsl', lang, node.text)
|
||||
translation = ir_translation_obj._get_source(cr, uid, self.name2, 'xsl', lang, node.text)
|
||||
if translation:
|
||||
node.text = translation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user