[FIX] point_of_sale: do not set 'invoiced' orders to done

This commit fixes github issue: https://github.com/odoo/odoo/issues/15170
This commit is contained in:
Denis Vermylen
2017-01-23 11:37:12 +01:00
parent 79bd2f3062
commit bcc517b6eb
+1 -1
View File
@@ -25,7 +25,7 @@ class PosSession(models.Model):
for order in session.order_ids.filtered(lambda o: o.state != 'done'):
if order.state not in ('paid', 'invoiced'):
raise UserError(_("You cannot confirm all orders of this session, because they have not the 'paid' status"))
order.action_pos_order_done()
order.filtered(lambda o: o.state == 'paid').action_pos_order_done()
config_id = fields.Many2one(
'pos.config', string='Point of Sale',