summaryrefslogtreecommitdiff
path: root/bin/report/interface.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@tinyerp.com>2009-12-02 08:28:08 +0100
committerXavier Morel <xmo@tinyerp.com>2009-12-02 08:28:08 +0100
commit1aceca7a8ca7a5e080cfbdcb957ada583ec05185 (patch)
treeafb8c8c47a665ea41ea5a2b8f1a937340d77c335 /bin/report/interface.py
parentfdcbed339b52e6e8f8170c7259f6a502d9bb028d (diff)
parente345e91365f2ab3c9130a3903715b1e1db5a477d (diff)
[merge] 5.0 in branch
bzr revid: xmo@tinyerp.com-20091202072808-fozu0u3rjiggzwiu
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)