Skip to content
Snippets Groups Projects
Commit aa7f5a00 authored by Guillaume (gdi)'s avatar Guillaume (gdi) Committed by qsm-odoo
Browse files

[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

closes odoo/odoo#93680

Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
parent f32992de
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,7 @@ class WebsiteBlog(http.Controller):
first_post = BlogPost
if not blog:
first_post = BlogPost.search(domain + [('website_published', '=', True)], order="post_date desc, id asc", limit=1)
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
posts = BlogPost.search(domain, offset=offset, limit=self._blog_post_per_page, order="is_published desc, post_date desc, id asc")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment