[IMP] point_of_sale: add product description and product sale description to the search engine

This commit is contained in:
Frederic van der Essen 2014-11-05 21:17:12 +01:00
parent 491372e865
commit 0ffa605e37
1 changed files with 11 additions and 5 deletions

View File

@ -134,7 +134,13 @@ function openerp_pos_db(instance, module){
str += '|' + product.ean13;
}
if (product.default_code) {
str += '|' + product.default_code;
str += '|' + product.default_code.replace(':','');
}
if (product.description) {
str += '|' + product.description.replace(':','');
}
if (product.description_sale) {
str += '|' + product.description_sale.replace(':','');
}
var packagings = this.packagings_by_product_tmpl_id[product.product_tmpl_id] || [];
for (var i = 0; i < packagings.length; i++) {
@ -330,7 +336,7 @@ function openerp_pos_db(instance, module){
}
var pack = this.packagings_by_ean13[ean13];
if(pack){
return this.product_by_id[pack.product_id[0]];
return this.product_by_id[pack.product_tmpl_id[0]];
}
return undefined;
},