[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
This commit is contained in:
Denis Ledoux
2017-03-02 15:16:19 +01:00
parent 987b54fde3
commit a9b8bbac48
+1 -1
View File
@@ -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)})