From 9b83b1ba64dc58ebc997bf5fdb38264351904c06 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 18 Dec 2017 09:36:57 +0100 Subject: [PATCH] [FIX] point_of_sale: prevent scanning on receipt - Sell a Product A - From receipt screen, scan the barcode of Product B - B will be in tab along with A - Pay and validate - Close the session Only an order with Product A is recorded in the session (order 1). When performing this set of actions, a new order is not created: the POS simply reuses the current order. However, `create_from_ui` (called in the receipt screen) discards an order if the reference already exists. This means that the first order is correctly synchronized at validation, while the second order is silently discarded. Closes #16781 opw-766459 --- addons/point_of_sale/static/src/js/screens.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 788276ea957..726231a9258 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1908,6 +1908,7 @@ var PaymentScreenWidget = ScreenWidget.extend({ } order.initialize_validation_date(); + order.finalized = true; if (order.is_to_invoice()) { var invoiced = this.pos.push_and_invoice_order(order); @@ -2010,4 +2011,3 @@ return { }; }); -