From 1487cf4e16384b2c217df01de4af2e5caabb3e37 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 14 Oct 2015 17:00:33 +0200 Subject: [PATCH] [FIX] stock: fix problem in barcode interface when trying to scan a location with a scanner this fix a problem when trying to scan a location inside the opened modal to change location from a product --- addons/stock/static/src/js/widgets.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock/static/src/js/widgets.js b/addons/stock/static/src/js/widgets.js index 3126911a677..b66abbd310b 100644 --- a/addons/stock/static/src/js/widgets.js +++ b/addons/stock/static/src/js/widgets.js @@ -152,7 +152,7 @@ function openerp_picking_widgets(instance){ }); this.$('.oe_searchbox').blur(function(){ self.getParent().barcode_scanner.connect(function(ean){ - self.get_Parent().scan(ean); + self.getParent().scan(ean); }); }) this.$('#js_select').change(function(){ @@ -844,8 +844,8 @@ function openerp_picking_widgets(instance){ if (result.filter_loc !== false){ //check if we have receive a location as answer if (result.filter_loc !== undefined){ - var modal_loc_hidden = self.$('#js_LocationChooseModal').attr('aria-hidden'); - if (modal_loc_hidden === "false"){ + var modal_loc_hidden = self.$('#js_LocationChooseModal:visible'); + if (modal_loc_hidden.length > 0){ var line = self.$('#js_LocationChooseModal .js_loc_option[data-loc-id='+result.filter_loc_id+']').attr('selected','selected'); } else{