diff options
Diffstat (limited to 'bin/report/interface.py')
| -rw-r--r-- | bin/report/interface.py | 6 |
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) |
