[FIX] website_sale: match product's internal note in search
Since [1] the product search from website did not match the content of the product internal note anymore. After this commit the product search from website also matches products if the terms appear in the product's internal note. [1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986 opw-2715647 closes odoo/odoo#84675 X-original-commit: 0f40c3754bfa9dc14e1e15a137b7c2bdf6230a9c Signed-off-by: Romain Derie (rde) <rde@odoo.com> Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
This commit is contained in:
@@ -378,6 +378,9 @@ class ProductTemplate(models.Model):
|
||||
if with_image:
|
||||
mapping['image_url'] = {'name': 'image_url', 'type': 'html'}
|
||||
if with_description:
|
||||
# Internal note is not part of the rendering.
|
||||
search_fields.append('description')
|
||||
fetch_fields.append('description')
|
||||
search_fields.append('description_sale')
|
||||
fetch_fields.append('description_sale')
|
||||
mapping['description'] = {'name': 'description_sale', 'type': 'text', 'match': True}
|
||||
|
||||
Reference in New Issue
Block a user