[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
This commit is contained in:
Denis Ledoux 2015-05-06 14:01:53 +02:00
parent a124988c52
commit 6b72008c32
1 changed files with 1 additions and 1 deletions

View File

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