[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) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This commit is contained in:
Pedram (pebr)
2024-01-29 18:42:33 +00:00
parent 3df8ac359c
commit 0c2fcee654
@@ -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() {