From 298eaca4d1e268c43185e9c1dd6d6973e02d9b57 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Wed, 9 Aug 2017 15:46:37 +0200 Subject: [PATCH] [FIX] point_of_sale: traceback when printing invoice from POS When we try to print an invoice from POS, this is cause by changing method signature and that we cannot choos the report template anymore. Refactoring in rev: https://github.com/odoo/odoo/commit/e80238042c9d93d492ea8b06b0041aced0d81dcd --- addons/point_of_sale/report/pos_invoice.py | 2 +- addons/point_of_sale/views/point_of_sale_report.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/report/pos_invoice.py b/addons/point_of_sale/report/pos_invoice.py index 5548212544463..7e25d2c6a8028 100644 --- a/addons/point_of_sale/report/pos_invoice.py +++ b/addons/point_of_sale/report/pos_invoice.py @@ -23,4 +23,4 @@ def get_report_values(self, docids, data=None): not_invoiced_orders_names = [a.name for a in not_invoiced_posorders] raise UserError(_('No link to an invoice for %s.') % ', '.join(not_invoiced_orders_names)) - return self.env['ir.actions.report'].sudo().render_template('account.report_invoice', {'docs': self.env['account.invoice'].sudo().browse(ids_to_print)}) + return {'docs': self.env['account.invoice'].sudo().browse(ids_to_print)} diff --git a/addons/point_of_sale/views/point_of_sale_report.xml b/addons/point_of_sale/views/point_of_sale_report.xml index ec7831b814a96..f0fd260e01bc0 100644 --- a/addons/point_of_sale/views/point_of_sale_report.xml +++ b/addons/point_of_sale/views/point_of_sale_report.xml @@ -25,4 +25,6 @@ point_of_sale.report_saledetails +