From 30ec3870dde9187f84f2a06691ac2be3ce784852 Mon Sep 17 00:00:00 2001 From: Benoit Socias Date: Tue, 15 Feb 2022 10:16:29 +0000 Subject: [PATCH] [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) Signed-off-by: Benoit Socias (bso) --- addons/website_sale/models/product_template.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/website_sale/models/product_template.py b/addons/website_sale/models/product_template.py index 8665323019b..2094e57f218 100644 --- a/addons/website_sale/models/product_template.py +++ b/addons/website_sale/models/product_template.py @@ -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}