From 3d8bd57bee817172824a2d446f61695b88b30173 Mon Sep 17 00:00:00 2001 From: "Eteil Djoumatchoua(etdj) etdj@odoo.com" Date: Thu, 23 Nov 2023 15:21:08 +0100 Subject: [PATCH] [FIX] website_slides: display the right number of records found on the search button Steps: - Go to website -> courses. - Make a search. Issue: Whatever there are records found or not, on the search button we see "(0) found". Reason: In the method responsible of search ``slides_channel_all_values()`` we don't pass ``search_count`` to the dict to be rendered. opw-3544856 closes odoo/odoo#144781 X-original-commit: c6afb4441c6d416258634ae9c09353e336f50dcc Signed-off-by: Thibault Delavallee (tde) --- addons/website_slides/controllers/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py index ccea472517c..330dd23a947 100644 --- a/addons/website_slides/controllers/main.py +++ b/addons/website_slides/controllers/main.py @@ -438,7 +438,7 @@ class WebsiteSlides(WebsiteProfile): ) search = post.get('search') order = self._channel_order_by_criterion.get(post.get('sorting')) - _, details, fuzzy_search_term = request.website._search_with_fuzzy("slide_channels_only", search, + search_count, details, fuzzy_search_term = request.website._search_with_fuzzy("slide_channels_only", search, limit=1000, order=order, options=options) channels = details[0].get('results', request.env['slide.channel']) @@ -461,6 +461,7 @@ class WebsiteSlides(WebsiteProfile): 'search_slide_category': slide_category, 'search_my': my, 'search_tags': search_tags, + 'search_count': search_count, 'top3_users': self._get_top3_users(), 'slugify_tags': self._slugify_tags, 'slide_query_url': QueryURL('/slides/all', ['tag']),