From a9b8bbac48aec808eb69a5a0e87af5bccb6906c3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 2 Mar 2017 15:12:50 +0100 Subject: [PATCH] [FIX] point_of_sale: re-print order invoice for pos users only If a user has as access right the POS User only, it wasn't possible for him to re-print the invoice of a pos order, through the "re-print" button in the "Extra Info" tab of the pos orders. opw-710163 --- addons/point_of_sale/report/pos_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/report/pos_invoice.py b/addons/point_of_sale/report/pos_invoice.py index 9ae226d4c56..71627f77682 100644 --- a/addons/point_of_sale/report/pos_invoice.py +++ b/addons/point_of_sale/report/pos_invoice.py @@ -24,4 +24,4 @@ class PosInvoiceReport(models.AbstractModel): not_invoiced_orders_names = list(map(lambda a: a.name, not_invoiced_posorders)) raise UserError(_('No link to an invoice for %s.') % ', '.join(not_invoiced_orders_names)) - return Report.sudo().render('account.report_invoice', {'docs': self.env['account.invoice'].browse(ids_to_print)}) + return Report.sudo().render('account.report_invoice', {'docs': self.env['account.invoice'].sudo().browse(ids_to_print)})