From bc39772f0a2381b507a30dcccf666030dca45c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 30 Jan 2014 16:43:52 +0100 Subject: [PATCH] [FIX] point_of_sale: add port and protocol to forced proxy ip if necessary bzr revid: fva@openerp.com-20140130154352-z2ulesl1wliodwja --- addons/point_of_sale/static/src/js/devices.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/devices.js b/addons/point_of_sale/static/src/js/devices.js index f52c0e7eaf4..2de500a8552 100644 --- a/addons/point_of_sale/static/src/js/devices.js +++ b/addons/point_of_sale/static/src/js/devices.js @@ -237,7 +237,14 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal this.set_connection_status('connecting'); if(options.force_ip){ - urls.push(options.force_ip); + var url = options.force_ip; + if(url.indexOf('//') < 0){ + url = 'http://'+url; + } + if(url.indexOf(':',5) < 0){ + url = url+port; + } + urls.push(url); }else{ if(localStorage['hw_proxy_url']){ urls.push(localStorage['hw_proxy_url']);