diff --git a/addons/point_of_sale/static/src/js/Chrome.js b/addons/point_of_sale/static/src/js/Chrome.js index d0d7039d4f3..36a67711cf9 100644 --- a/addons/point_of_sale/static/src/js/Chrome.js +++ b/addons/point_of_sale/static/src/js/Chrome.js @@ -206,20 +206,20 @@ odoo.define('point_of_sale.Chrome', function(require) { } connect_to_proxy() { - return new Promise(function (resolve, reject) { + return new Promise((resolve, reject) => { this.env.barcode_reader.disconnect_from_proxy(); this.state.loadingSkipButtonIsShown = true; this.env.proxy.autoconnect({ force_ip: this.env.pos.config.proxy_ip || undefined, progress: function(prog){}, }).then( - function () { + () => { if (this.env.pos.config.iface_scan_via_proxy) { this.env.barcode_reader.connect_to_proxy(); } resolve(); }, - function (statusText, url) { + (statusText, url) => { // this should reject so that it can be captured when we wait for pos.ready // in the chrome component. // then, if it got really rejected, we can show the error. diff --git a/addons/point_of_sale/static/src/js/devices.js b/addons/point_of_sale/static/src/js/devices.js index 1613d297474..a285af5d2b4 100644 --- a/addons/point_of_sale/static/src/js/devices.js +++ b/addons/point_of_sale/static/src/js/devices.js @@ -447,7 +447,7 @@ var ProxyDevice = core.Class.extend(mixins.PropertiesMixin,{ }, update_customer_facing_display: function(html) { - if (this.posbox_supports_display) { + if (this.posbox_supports_display && this.get('status').status == 'connected') { return this.message('customer_facing_display', { html: html }, { timeout: 5000 });