# -*- coding: utf-8 -*- from functools import partial from openerp.osv import osv from openerp import exceptions, _ class MoconaReport(osv.AbstractModel): _name = 'report.project_features_dental_mocona.mocona_report' def render_html(self, cr, uid, ids, data=None, context=None): report_obj = self.pool['report'] report_mocona_obj = self.pool['project.task'] report = report_obj._get_report_from_name( cr, uid, 'project_features_dental_mocona.mocona_report') selected_orders = report_mocona_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, 'project_features_dental_mocona.mocona_report', docargs, context=context)