From 6782ec3f959f1d373bfd9550efdf425efe8165fa Mon Sep 17 00:00:00 2001 From: "Guillaume (gdi)" Date: Mon, 24 Oct 2022 08:00:27 +0000 Subject: [PATCH] [FIX] website_blog: display all the blog posts when filtered Before this commit, following these steps: - Go to /blog - Activate the option Customize > Top banner - Name / Latest Post - Disable the option Customize > Full Width Cover - Click on the "guides" tag of the "Buying A Telescope" blog No blog is displayed. This was because the top banner post is not shown when the posts are filtered. Basically, once filtered, a blog post was always missing. Related to opw-2882492 X-original-commit: ee2f778abb8b7a6e221e05361bc7b964593d1123 Part-of: odoo/odoo#104639 --- addons/website_blog/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index 902eee77535..364e261fd57 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -113,7 +113,7 @@ class WebsiteBlog(http.Controller): # if blog, we show blog title, if use_cover and not fullwidth_cover we need pager + latest always offset = (page - 1) * self._blog_post_per_page if not blog: - if use_cover and not fullwidth_cover: + if use_cover and not fullwidth_cover and not tags and not date_begin and not date_end: offset += 1 options = self._get_blog_post_search_options(