búsqueda en el TPV por referencia, autor, género y editorial.
backup files atacks again...
This commit is contained in:
parent
f6023acc5a
commit
22d71e80dc
7 changed files with 82 additions and 136 deletions
28
product_library/static/src/js/db.js
Normal file
28
product_library/static/src/js/db.js
Normal 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;
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue