From bcc517b6eb7c288021b399dadab2437db1f3f7db Mon Sep 17 00:00:00 2001 From: Denis Vermylen Date: Mon, 23 Jan 2017 11:37:12 +0100 Subject: [PATCH] [FIX] point_of_sale: do not set 'invoiced' orders to done This commit fixes github issue: https://github.com/odoo/odoo/issues/15170 --- addons/point_of_sale/models/pos_session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index d30c96ac0f3..2ccb258b711 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -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',