diff options
| author | Frédéric van der Essen <fva@openerp.com> | 2014-01-30 16:43:52 +0100 |
|---|---|---|
| committer | Frédéric van der Essen <fva@openerp.com> | 2014-01-30 16:43:52 +0100 |
| commit | bc39772f0a2381b507a30dcccf666030dca45c63 (patch) | |
| tree | 438efbb88683be513d276bf0b432a899539908e6 | |
| parent | ff0e5318f65d9cf05812d2edd4b0e0d2ff6d2268 (diff) | |
[FIX] point_of_sale: add port and protocol to forced proxy ip if necessary
bzr revid: fva@openerp.com-20140130154352-z2ulesl1wliodwja
| -rw-r--r-- | addons/point_of_sale/static/src/js/devices.js | 9 |
1 files changed, 8 insertions, 1 deletions
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']); |
