bugfix for report calling from wizard

bzr revid: hda@tinyerp.com-20080812085805-ygtvk1flpxvrptm0
This commit is contained in:
hda@tinyerp.com 2008-08-12 14:28:05 +05:30
parent 53c85092d1
commit adedf0caf3
1 changed files with 2 additions and 1 deletions

View File

@ -571,7 +571,9 @@ class report_sxw(report_rml):
[('report_name', '=', self.name[7:])], context=context)
report_type = 'pdf'
report_xml = None
title=''
if report_xml_ids:
title = ir_actions_report_xml_obj.browse(cr,uid,report_xml_ids)[0].name
report_xml = ir_actions_report_xml_obj.browse(cr, uid, report_xml_ids[0],
context=context)
rml = report_xml.report_rml_content
@ -660,7 +662,6 @@ class report_sxw(report_rml):
logo = base64.decodestring(rml_parser.logo)
create_doc = self.generators[report_type]
title = ir_actions_report_xml_obj.browse(cr,uid,report_xml_ids)[0].name
pdf = create_doc(rml2, logo,title)
return (pdf, report_type)