From dad1e378258894f0d77fa56c398d809de6ac8162 Mon Sep 17 00:00:00 2001 From: Darshan Kalola Date: Mon, 23 Nov 2015 11:47:00 +0530 Subject: [PATCH] [FIX] pos_restaurant: transferring order to a table already containing order Before this, transferring an order to a table which already contains an order triggered the change on the order already on the table, Not the newly transferred order. This fixes that by instead explicitly calling save_to_db() on the transferred order instead. --- addons/pos_restaurant/static/src/js/floors.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/pos_restaurant/static/src/js/floors.js b/addons/pos_restaurant/static/src/js/floors.js index b2bc167a258..99bf8088c3c 100644 --- a/addons/pos_restaurant/static/src/js/floors.js +++ b/addons/pos_restaurant/static/src/js/floors.js @@ -784,13 +784,12 @@ models.PosModel = models.PosModel.extend({ this.set_order(null); } else if (this.order_to_transfer_to_different_table) { this.order_to_transfer_to_different_table.table = table; + this.order_to_transfer_to_different_table.save_to_db(); this.order_to_transfer_to_different_table = null; // set this table this.set_table(table); - // trigger a change so the table change gets stored in localStorage - this.get_order().trigger('change', this.get_order()); } else { this.table = table; var orders = this.get_order_list();