diff --git a/product_category_tax/models/product_product.py b/product_category_tax/models/product_product.py index 7f44f0a..2b827e5 100644 --- a/product_category_tax/models/product_product.py +++ b/product_category_tax/models/product_product.py @@ -23,7 +23,7 @@ class ProductProduct(models.Model): elif template_id: template = self.env["product.template"].browse(template_id) cat = template.categ_id - if not cat and self.env.user.company_id.use_parent_categories_to_determine_taxes: + if self.env.user.company_id.use_parent_categories_to_determine_taxes: while not cat.pos_categ_id and cat.parent_id: cat = cat.parent_id if cat: diff --git a/product_library/static/src/js/db.js b/product_library/static/src/js/db.js index ce7863c..7b6983a 100644 --- a/product_library/static/src/js/db.js +++ b/product_library/static/src/js/db.js @@ -5,7 +5,7 @@ db.include({ _product_search_string: function(product){ - var str = product.name; + var str = product.display_name; if(product.default_code){ str += '|' + product.default_code; } @@ -18,7 +18,16 @@ if(product.editorial){ str += '|' + product.editorial; } - str = '' + product.id + ':' + str.replace(':','') + '\n'; + str += '|' + product.description; +/* + if (product.description) { + str += '|' + product.description; + } + if (product.description_sale) { + str += '|' + product.description_sale; + } +*/ + str = product.id + ':' + str.replace(':','') + '\n'; return str; }, });