summaryrefslogtreecommitdiff
path: root/bin/report/interface.py
diff options
context:
space:
mode:
authorR.Messier <>2009-12-01 16:31:49 +0530
committerJay (Open ERP) <jvo@tinyerp.com>2009-12-01 16:31:49 +0530
commitbb6e26450e975a218434f46ede4b98cb0c701fc8 (patch)
treee0753d0509aa76b4a44ac45d3e3675207dd634dc /bin/report/interface.py
parent0858a7c066fd793cd33c116752d825cc3f59b840 (diff)
[FIX] RAW reports creation corrected
lp bug: https://launchpad.net/bugs/490604 fixed bzr revid: jvo@tinyerp.com-20091201110149-2flhfi59r9t909n4
Diffstat (limited to 'bin/report/interface.py')
-rw-r--r--bin/report/interface.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/report/interface.py b/bin/report/interface.py
index 09ea80720ac..cd548301c26 100644
--- a/bin/report/interface.py
+++ b/bin/report/interface.py
@@ -88,14 +88,14 @@ class report_rml(report_int):
def create(self, cr, uid, ids, datas, context):
xml = self.create_xml(cr, uid, ids, datas, context)
xml = tools.ustr(xml).encode('utf8')
- if datas.get('report_type', 'pdf') == 'raw':
- return xml
+ report_type = datas.get('report_type', 'pdf')
+ if report_type == 'raw':
+ return (xml,report_type)
rml = self.create_rml(cr, xml, uid, context)
pool = pooler.get_pool(cr.dbname)
ir_actions_report_xml_obj = pool.get('ir.actions.report.xml')
report_xml_ids = ir_actions_report_xml_obj.search(cr, uid, [('report_name', '=', self.name[7:])], context=context)
self.title = report_xml_ids and ir_actions_report_xml_obj.browse(cr,uid,report_xml_ids)[0].name or 'OpenERP Report'
- report_type = datas.get('report_type', 'pdf')
create_doc = self.generators[report_type]
pdf = create_doc(rml, title=self.title)
return (pdf, report_type)