[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
This commit is contained in:
Nicolas Lempereur 2015-09-08 16:42:09 +02:00
parent c092c40d14
commit 4626240d5d
1 changed files with 3 additions and 0 deletions

View File

@ -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);