diff --git a/addons/website_sale/models/product_template.py b/addons/website_sale/models/product_template.py index 682e74cf7fc..aee408e68b6 100644 --- a/addons/website_sale/models/product_template.py +++ b/addons/website_sale/models/product_template.py @@ -467,10 +467,11 @@ class ProductTemplate(models.Model): ids = [value[1]] if attrib: domains.append([('attribute_line_ids.value_ids', 'in', ids)]) - search_fields = ['name', 'product_variant_ids.default_code'] + search_fields = ['name', 'default_code', 'product_variant_ids.default_code'] fetch_fields = ['id', 'name', 'website_url'] mapping = { 'name': {'name': 'name', 'type': 'text', 'match': True}, + 'default_code': {'name': 'default_code', 'type': 'text', 'match': True}, 'product_variant_ids.default_code': {'name': 'product_variant_ids.default_code', 'type': 'text', 'match': True}, 'website_url': {'name': 'website_url', 'type': 'text', 'truncate': False}, }