From 894390db66805cedfbf29335afc2a8f39658bd5a Mon Sep 17 00:00:00 2001 From: Anton Chepurov Date: Sun, 27 Sep 2015 15:45:00 +0300 Subject: [PATCH] [FIX] #62: Printing multiple items directly to a printer only prints first item --- report_aeroo_direct_print/report_aeroo_direct_print.py | 1 + 1 file changed, 1 insertion(+) diff --git a/report_aeroo_direct_print/report_aeroo_direct_print.py b/report_aeroo_direct_print/report_aeroo_direct_print.py index c778abb4..466a055e 100644 --- a/report_aeroo_direct_print/report_aeroo_direct_print.py +++ b/report_aeroo_direct_print/report_aeroo_direct_print.py @@ -44,6 +44,7 @@ class report_print_actions(models.TransientModel): _inherit = 'aeroo.print_actions' def report_to_printer(self, cr, uid, ids, report_id, printer, context={}): + ids = context.get('active_ids', ids) context['active_ids'] = ids report_xml = self.pool.get('ir.actions.report.xml').browse(cr, uid, report_id, context=context) data = {'model': report_xml.model, 'id': context['active_ids'][0], 'report_type': 'aeroo'}