From 8f14f7a2f29470b7be018d1380bd12d3b1ccfd64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 20 Jan 2015 11:37:44 +0100 Subject: [PATCH] [FIX] point_of_sale: skip empty barcodes --- addons/point_of_sale/static/src/js/devices.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/point_of_sale/static/src/js/devices.js b/addons/point_of_sale/static/src/js/devices.js index 2ec7f9f61ed..53398639e7a 100644 --- a/addons/point_of_sale/static/src/js/devices.js +++ b/addons/point_of_sale/static/src/js/devices.js @@ -507,6 +507,9 @@ openerp.point_of_sale.load_devices = function load_devices(instance,module){ //m }, scan: function(code){ + if (!code) { + return; + } var parsed_result = this.barcode_parser.parse_barcode(code); if(parsed_result.type in {'product':'', 'weight':'', 'price':''}){ //barcode is associated to a product