From a38dfaa6051341f02a466f668fb69da9679c0124 Mon Sep 17 00:00:00 2001 From: "Adrien Guilliams (adgu)" Date: Wed, 26 Apr 2023 09:07:02 +0000 Subject: [PATCH] [FIX] point_of_sale: reduce orders to sync in cross-orders With the cross-orders feature, whenever the PoS have to sync with the server, it send to the servers the orders that have changed since the last sync. The problem is that we added to this set all the orders that we loaded from the server even if they didn't change between the two sync. We fix this here. closes odoo/odoo#119929 X-original-commit: 4ba8699b95325480c9ebfc0ca3c8a2433b15b87a Signed-off-by: Monnom David (moda) --- addons/point_of_sale/static/src/js/models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 171602d1cf5..54e0c973a3a 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -450,7 +450,7 @@ export class PosGlobalState extends PosModel { } _onReactiveOrderUpdated(order) { order.save_to_db(); - if (this.isOpenOrderShareable()) { + if (this.isOpenOrderShareable() && !this.loadingOrderState) { this.ordersToUpdateSet.add(order); } }