From 646e0334c83bd636868ea7d772352ee546859a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20L=C3=B3pez=20L=C3=B3pez=20=28OpenERP=29?= Date: Thu, 29 Mar 2012 12:25:48 +0200 Subject: [PATCH] [fix] fix 'in' expression when reading a price or weight barcode bzr revid: rlo@openerp.com-20120329102548-gnffz8am3m755agq --- addons/point_of_sale/static/src/js/pos.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/static/src/js/pos.js b/addons/point_of_sale/static/src/js/pos.js index 81ac6cff516..17c9da5e92c 100644 --- a/addons/point_of_sale/static/src/js/pos.js +++ b/addons/point_of_sale/static/src/js/pos.js @@ -1328,14 +1328,14 @@ openerp.point_of_sale = function(db) { } }); } - if (barcode.substring(0,2) in ['02', '22', '24', '26', '28']) { + if (barcode.substring(0,2) in {'02':'', '22':'', '24':'', '26':'', '28':''}) { // product with a specific price - specified into the barcode barcode = barcode.substring(2,5); // TODO conversion euro - old local currencies new db.web.Model('res.currency').get_func('_get_conversion_rate')(['FRF', 'EUR']).pipe(function(result){}); price = Number(barcode.substring(7,5))/100; weight = ''; - } else if (barcode.substring(0,2) in ['21','23','27','29','25']) { + } else if (barcode.substring(0,2) in {'21':'','23':'','27':'','29':'','25':''}) { // product sold by weight barcode = barcode.substring(2,5); weight = Number(barcode.substring(7,5))/1000;