[FIX] point_of_sale: missing costumer facing display's check

Some calls to send_current_order_to_customer_facing_display() method
miss the check to the POS config's iface_customer_facing_display
property, resulting into an error during the rendering of the template.

This bug was introduce by odoo/odoo@5d0afddaf2

closes odoo/odoo#36916

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
Pierre Paridans
2019-09-16 10:31:17 +00:00
parent e33172e832
commit f230b5c71a
2 changed files with 9 additions and 4 deletions
+6 -3
View File
@@ -665,7 +665,9 @@ 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();
if (this.config.iface_customer_facing_display) {
this.send_current_order_to_customer_facing_display();
}
return order;
},
/**
@@ -2660,8 +2662,9 @@ exports.Order = Backbone.Model.extend({
if(line.has_product_lot){
this.display_lot_popup();
}
this.pos.send_current_order_to_customer_facing_display();
if (this.pos.config.iface_customer_facing_display) {
this.pos.send_current_order_to_customer_facing_display();
}
},
get_selected_orderline: function(){
return this.selected_orderline;
@@ -551,7 +551,9 @@ 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();
if (this.pos.config.iface_customer_facing_display) {
this.pos.send_current_order_to_customer_facing_display();
}
}
},
change_selected_order: function() {