From 0c2fcee65490a5e7142363d37e492806310f29ed Mon Sep 17 00:00:00 2001 From: "Pedram (pebr)" Date: Tue, 23 Jan 2024 15:07:55 +0100 Subject: [PATCH] [FIX] point_of_sale: save last preparation change on order Prior to this commit, when adding a product to an order, navigating back to the floor screen, and subsequently reopening the table, clicking on "Order" would send the order to the preparation display again. The issue stemmed from the fact that "this" was being added to "ordersToUpdateSet" in posStore, whereas "order" should be added to that set. opw-3687977 closes odoo/odoo#150973 X-original-commit: 633179542d8cd7e32c51f4d6bd9c25decb2e56ae Signed-off-by: Joseph Caburnay (jcb) Signed-off-by: Pedram Bi Ria (pebr) --- addons/point_of_sale/static/src/app/store/pos_store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/app/store/pos_store.js b/addons/point_of_sale/static/src/app/store/pos_store.js index 7e5bd6b91be..dd387b69e5e 100644 --- a/addons/point_of_sale/static/src/app/store/pos_store.js +++ b/addons/point_of_sale/static/src/app/store/pos_store.js @@ -1740,7 +1740,7 @@ export class PosStore extends Reactive { //We make sure that the last_order_change is updated in the backend order.save_to_db(); - order.pos.ordersToUpdateSet.add(this); + order.pos.ordersToUpdateSet.add(order); order.pos.sendDraftToServer(); } closeScreen() {