diff options
| author | Stéphane Bidoul (ACSONE) <stephane.bidoul@acsone.eu> | 2015-04-13 19:35:23 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2015-06-26 08:51:25 +0200 |
| commit | 4213eebe2ebe6b0c81580176b263aeee9fa6a3fd (patch) | |
| tree | fb4d2fb237d2783556762d3b243ea2ed7ead6108 | |
| parent | 745e4426b4c77c91b2b83d742e5c2ce0c06601fd (diff) | |
[FIX] point_of_sale: correctly split workds in product search
The JS replace method, unlike python's, only replaces the first occurence
unless a search pattern is provided.
Closes #6302
| -rw-r--r-- | addons/point_of_sale/static/src/js/db.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index ed3a72c7e28..819c21fb37b 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -362,7 +362,7 @@ function openerp_pos_db(instance, module){ search_product_in_category: function(category_id, query){ try { query = query.replace(/[\[\]\(\)\+\*\?\.\-\!\&\^\$\|\~\_\{\}\:\,\\\/]/g,'.'); - query = query.replace(' ','.+'); + query = query.replace(/ /g,'.+'); var re = RegExp("([0-9]+):.*?"+query,"gi"); }catch(e){ return []; |
