diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 1bfe646ebee..de64e9cb139 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -652,6 +652,7 @@ exports.PosModel = Backbone.Model.extend({ var order = new exports.Order({},{pos:this}); this.get('orders').add(order); this.set('selectedOrder', order); + this.send_current_order_to_customer_facing_display(); return order; }, /** @@ -2252,9 +2253,6 @@ exports.Order = Backbone.Model.extend({ this.paymentlines.on('remove', function(){ this.save_to_db("paymentline:rem"); }, this); if (this.pos.config.iface_customer_facing_display) { - this.orderlines.on('change', this.pos.send_current_order_to_customer_facing_display, this.pos); - // removing last orderline does not trigger change event - this.orderlines.on('remove', this.pos.send_current_order_to_customer_facing_display, this.pos); this.paymentlines.on('change', this.pos.send_current_order_to_customer_facing_display, this.pos); // removing last paymentline does not trigger change event this.paymentlines.on('remove', this.pos.send_current_order_to_customer_facing_display, this.pos); @@ -2655,6 +2653,8 @@ exports.Order = Backbone.Model.extend({ if(line.has_product_lot){ this.display_lot_popup(); } + + this.pos.send_current_order_to_customer_facing_display(); }, get_selected_orderline: function(){ return this.selected_orderline; diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index c988db5cfdb..80ddbde9191 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -551,6 +551,7 @@ var OrderWidget = PosBaseWidget.extend({ selected_orderline.price_manually_set = true; selected_orderline.set_unit_price(val); } + this.pos.send_current_order_to_customer_facing_display(); } }, change_selected_order: function() {