búsqueda en el TPV por referencia, autor, género y editorial.

backup files atacks again...
This commit is contained in:
santiky 2021-08-09 19:43:59 +02:00
parent f6023acc5a
commit 22d71e80dc
Signed by: snt
GPG key ID: A9FD34930EADBE71
7 changed files with 82 additions and 136 deletions

View file

@ -0,0 +1,28 @@
odoo.define('product_library', function (require) {
"use strict";
var db = require("point_of_sale.DB");
db.include({
_product_search_string: function(product){
var str = product.name;
if(product.default_code){
str += '|' + product.default_code;
}
if(product.autor){
str += '|' + product.autor;
}
if(product.genero){
str += '|' + product.genero;
}
if(product.editorial){
str += '|' + product.editorial;
}
str = '' + product.id + ':' + str.replace(':','') + '\n';
return str;
},
});
return db;
});