Skip to content
Snippets Groups Projects
Commit 0f40c375 authored by Benoit Socias's avatar Benoit Socias
Browse files

[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#84615

Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
parent f587ee0a
Branches
Tags
No related merge requests found
......@@ -371,6 +371,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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment