From 4626240d5d983b43c5fd890379a5b1879b93c088 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 8 Sep 2015 16:42:09 +0200 Subject: [PATCH] [FIX] point_of_sale: don't read for barcode when search focused The product search field already handle product scanned by a code bar (by adding it if it corresponds to only one product to the order) so when the barcode is entered in this search input, the scan doesn't need to be done. closes #8433 opw-648856 --- addons/point_of_sale/static/src/js/widgets.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 2ff1a53f47c..59decb450ac 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -539,6 +539,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa this.product_list_widget.set_product_list(products); this.el.querySelector('.searchbox input').addEventListener('keyup',this.search_handler); + $('.searchbox input', this.el).keypress(function(e){ + e.stopPropagation(); + }); this.el.querySelector('.search-clear').addEventListener('click',this.clear_search_handler);