123456789101112131415161718192021222324252627 |
- # -*- coding: utf-8 -*-
- from functools import partial
- from openerp.osv import osv
- from openerp import exceptions, _
- from reportlab.graphics.barcode import createBarcodeDrawing
- class PartnerReport(osv.AbstractModel):
- _name = 'report.eiru_ticket_sharon.partner_report'
- def render_html(self, cr, uid, ids, data=None, context=None):
- report_obj = self.pool['report']
- obj = self.pool['account.invoice']
- report = report_obj._get_report_from_name(
- cr, uid, 'eiru_ticket_sharon.partner_report')
- selected_orders = obj.browse(
- cr, uid, ids, context=context)
- docargs = {
- 'doc_ids': ids,
- 'doc_model': report.model,
- 'docs': selected_orders,
- }
- return report_obj.render(
- cr, uid, ids, 'eiru_ticket_sharon.partner_report',
- docargs, context=context)
|