Fixed calling private method code changed from service to pooler

bzr revid: hda@tinyerp.com-20100330094617-9njeiguur4hnupit
This commit is contained in:
HDA (OpenERP) 2010-03-30 15:16:17 +05:30
parent 8a10ac164a
commit d69ca9424e
1 changed files with 3 additions and 4 deletions

View File

@ -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