Skip to content

Commit

Permalink
[FIX] point_of_sale: missing costumer facing display's check
Browse files Browse the repository at this point in the history
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@5d0afddaf221756378

closes odoo#36916

Signed-off-by: pimodoo <[email protected]>
  • Loading branch information
pparidans committed Sep 16, 2019
1 parent e33172e commit f230b5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions addons/point_of_sale/static/src/js/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
/**
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion addons/point_of_sale/static/src/js/screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit f230b5c

Please sign in to comment.