Skip to content
Snippets Groups Projects
Commit 1e436c23 authored by gawa-odoo's avatar gawa-odoo Committed by Jacky (trj)
Browse files

[FIX] pos_restaurant: set order from TicketScreen in a table


Steps to reproduce:
 - Create two orders on a table with some products
 - Go back to the FloorScreen
 - Go back to the table and add a product
 - Go to the TicketScreen and take the other order
 - Go back to the first order and the added product won't appear

This is due to the fact that when setting an order which is different than the
current order through the TicketScreen will indirectly fetch the latest state
of the table and bypass the syncing which happens in the FloorScreen.
This is wrong as the fetching should only happens when going to a table and not
navigating between the orders of the same table.

closes odoo/odoo#105962

Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
parent 575c0c58
Branches
Tags
No related merge requests found
......@@ -42,12 +42,9 @@ odoo.define('pos_restaurant.TicketScreen', function (require) {
});
}
_setOrder(order) {
if (!this.env.pos.config.iface_floorplan || order === this.env.pos.get_order()) {
if (!this.env.pos.config.iface_floorplan || this.env.pos.table) {
super._setOrder(order);
} else if (order !== this.env.pos.get_order()) {
// Only call set_table if the order is not the same as the current order.
// This is to prevent syncing to the server because syncing is only intended
// when going back to the floorscreen or opening a table.
} else {
this.env.pos.set_table(order.table, order);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment