[FIX] website_sale: searchbar also search product code
Step to reproduce: - Search code of product in website_sale search bar Current Bheaviour: - No result Behaviour after PR: - Search also try to match , similar behaviour to V14 and before opw-2737648 closes odoo/odoo#86921 X-original-commit: 395643d1377750577f3588506035623f9d0489c9 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -415,10 +415,11 @@ class ProductTemplate(models.Model):
|
||||
ids = [value[1]]
|
||||
if attrib:
|
||||
domains.append([('attribute_line_ids.value_ids', 'in', ids)])
|
||||
search_fields = ['name']
|
||||
search_fields = ['name', 'product_variant_ids.default_code']
|
||||
fetch_fields = ['id', 'name', 'website_url']
|
||||
mapping = {
|
||||
'name': {'name': 'name', '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},
|
||||
}
|
||||
if with_image:
|
||||
|
||||
Reference in New Issue
Block a user