From b3bcd4eabcd99c18780d6ed03e85290314001b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Thu, 16 Aug 2012 17:58:01 +0200 Subject: [PATCH] [FIX] point_of_sale: fixed some bugs with the scanner bzr revid: fva@openerp.com-20120816155801-oexzurmsgfiv2xt9 --- addons/point_of_sale/static/src/js/pos_devices.js | 2 +- addons/point_of_sale/static/src/js/pos_screens.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/js/pos_devices.js b/addons/point_of_sale/static/src/js/pos_devices.js index d39597c0b02..a6be16b3835 100644 --- a/addons/point_of_sale/static/src/js/pos_devices.js +++ b/addons/point_of_sale/static/src/js/pos_devices.js @@ -298,7 +298,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal // returns true if the ean is a valid EAN codebar number by checking the control digit. // ean must be a string check_ean: function(ean){ - return ean_checksum(ean) === Number(ean[ean.length-1]); + return this.ean_checksum(ean) === Number(ean[ean.length-1]); }, // returns a valid zero padded ean13 from an ean prefix. the ean prefix must be a string. sanitize_ean:function(ean){ diff --git a/addons/point_of_sale/static/src/js/pos_screens.js b/addons/point_of_sale/static/src/js/pos_screens.js index 115c157714b..a007453bd9e 100644 --- a/addons/point_of_sale/static/src/js/pos_screens.js +++ b/addons/point_of_sale/static/src/js/pos_screens.js @@ -160,7 +160,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa // there's an error. barcode_product_action: function(ean){ var self = this; - if(pos_widget.scan_product(ean)){ + if(self.pos.scan_product(ean)){ self.pos.proxy.scan_item_success(ean); if(self.barcode_product_screen){ self.pos_widget.screen_selector.set_current_screen(self.barcode_product_screen);