[FIX] point_of_sale: fixed some bugs with the scanner

bzr revid: fva@openerp.com-20120816155801-oexzurmsgfiv2xt9
This commit is contained in:
Frédéric van der Essen
2012-08-16 17:58:01 +02:00
parent daba4e4fc2
commit b3bcd4eabc
2 changed files with 2 additions and 2 deletions
@@ -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){
@@ -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);