|
|
@ -93,7 +93,8 @@ class PDFReportAssembler(report_sxw.report_sxw): |
|
|
|
|
|
|
|
report_ids = self._get_report_ids(cr, uid, ids, context=context) |
|
|
|
|
|
|
|
pdf_reports = self._generate_all_pdf(cr, uid, ids, data, report_ids, context=context) |
|
|
|
pdf_reports = self._generate_all_pdf( |
|
|
|
cr, uid, ids, data, report_ids, context=context) |
|
|
|
|
|
|
|
pdf_assemblage = assemble_pdf(pdf_reports) |
|
|
|
return pdf_assemblage, 'pdf' |
|
|
@ -103,8 +104,10 @@ class PDFReportAssembler(report_sxw.report_sxw): |
|
|
|
Code taken from report openoffice. Thanks guys :) """ |
|
|
|
pool = pooler.get_pool(cr.dbname) |
|
|
|
ir_obj = pool.get('ir.actions.report.xml') |
|
|
|
report_xml_ids = ir_obj.search(cr, uid, |
|
|
|
[('report_name', '=', self.name[7:])], context=context) |
|
|
|
report_xml_ids = ir_obj.search( |
|
|
|
cr, uid, |
|
|
|
[('report_name', '=', self.name[7:])], |
|
|
|
context=context) |
|
|
|
if report_xml_ids: |
|
|
|
|
|
|
|
report_xml = ir_obj.browse(cr, |
|
|
@ -117,10 +120,13 @@ class PDFReportAssembler(report_sxw.report_sxw): |
|
|
|
report_xml.report_sxw_content = None |
|
|
|
report_xml.report_sxw = None |
|
|
|
else: |
|
|
|
return super(PDFReportAssembler, self).create(cr, uid, ids, data, context) |
|
|
|
return super(PDFReportAssembler, self).create( |
|
|
|
cr, uid, ids, data, context) |
|
|
|
if report_xml.report_type != 'assemblage': |
|
|
|
return super(PDFReportAssembler, self).create(cr, uid, ids, data, context) |
|
|
|
result = self.create_source_pdf(cr, uid, ids, data, report_xml, context) |
|
|
|
return super(PDFReportAssembler, self).create( |
|
|
|
cr, uid, ids, data, context) |
|
|
|
result = self.create_source_pdf( |
|
|
|
cr, uid, ids, data, report_xml, context) |
|
|
|
if not result: |
|
|
|
return (False, False) |
|
|
|
return result |