[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:
Benoit Socias
2022-02-16 07:53:40 +00:00
parent b94bfa039c
commit 30ec3870dd
@@ -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}