From 6b72008c32345e1413f654ba24d0b521dc9bdf33 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 6 May 2015 14:01:53 +0200 Subject: [PATCH] [FIX] point_of_sale: products search with ':' in products names This is related to revision bb913d0. ':' in product names are removed, to avoid issues when searching products with ':' in their name. JS replace method only replaces the first occurence, if the needle isn't set as a regex with 'g', e.g. /':'/g opw-634547 --- addons/point_of_sale/static/src/js/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/db.js b/addons/point_of_sale/static/src/js/db.js index 58d458d7560..ed3a72c7e28 100644 --- a/addons/point_of_sale/static/src/js/db.js +++ b/addons/point_of_sale/static/src/js/db.js @@ -146,7 +146,7 @@ function openerp_pos_db(instance, module){ for (var i = 0; i < packagings.length; i++) { str += '|' + packagings[i].ean; } - str = product.id + ':' + str.replace(':','') + '\n'; + str = product.id + ':' + str.replace(/:/g,'') + '\n'; return str; }, add_products: function(products){