Skip to content

Commit

Permalink
[FIX] point_of_sale: traceback when printing invoice from POS
Browse files Browse the repository at this point in the history
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: e802380
  • Loading branch information
pimodoo committed Aug 10, 2017
1 parent b159184 commit 298eaca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/point_of_sale/report/pos_invoice.py
Expand Up @@ -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)}
2 changes: 2 additions & 0 deletions addons/point_of_sale/views/point_of_sale_report.xml
Expand Up @@ -25,4 +25,6 @@
<field name="report_name">point_of_sale.report_saledetails</field>
</record>

<template id="report_invoice" inherit_id="account.report_invoice" primary="True"/>

</odoo>

0 comments on commit 298eaca

Please sign in to comment.