From 2fec901cb551ec13de28ed7799351fb8d71b3036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 19 Dec 2013 15:29:11 +0100 Subject: [PATCH] [FIX] point_of_sale & hw_proxy: connect the pos to the new proxy, and fix scale emulation bzr revid: fva@openerp.com-20131219142911-i9mkwqt1e0wz28i7 --- addons/hw_proxy/controllers/main.py | 3 +++ addons/point_of_sale/static/src/js/devices.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/hw_proxy/controllers/main.py b/addons/hw_proxy/controllers/main.py index 71075456744..4df01372846 100644 --- a/addons/hw_proxy/controllers/main.py +++ b/addons/hw_proxy/controllers/main.py @@ -14,6 +14,9 @@ _logger = logging.getLogger(__name__) class ProxyController(http.Controller): def __init__(self): + self.scale = 'closed' + self.scale_weight = 0.0 + pass @http.route('/hw_proxy/test_connection', type='json', auth='admin') def test_connection(self): diff --git a/addons/point_of_sale/static/src/js/devices.js b/addons/point_of_sale/static/src/js/devices.js index abf4a1787e0..a1d8e19aacc 100644 --- a/addons/point_of_sale/static/src/js/devices.js +++ b/addons/point_of_sale/static/src/js/devices.js @@ -118,7 +118,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal callbacks[i](params); } if(this.connected){ - return this.connection.rpc('/pos/' + name, params || {}); + return this.connection.rpc('/hw_proxy/' + name, params || {}); }else{ return (new $.Deferred()).reject(); }