[FIX] website_blog: add missing website=True in feed

Before this commit, if you archive a blog, you will have a 500 instead of 404.
Serve page to show the 404 use request.website, so we need to force controller
with website=True to bind website on the request.

Probably need to check all controllers in website_* module.

opw-2066725

closes odoo/odoo#38539

X-original-commit: 74341c4fcba701fe5ce7ee742880bbf138131a0d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
fw-bot
2019-10-11 18:04:04 +00:00
parent fd51030c43
commit e2d27c9e81
+1 -1
View File
@@ -165,7 +165,7 @@ class WebsiteBlog(http.Controller):
return request.render("website_blog.blog_post_short", values)
@http.route(['''/blog/<model("blog.blog", "[('website_id', 'in', (False, current_website_id))]"):blog>/feed'''], type='http', auth="public")
@http.route(['''/blog/<model("blog.blog", "[('website_id', 'in', (False, current_website_id))]"):blog>/feed'''], type='http', auth="public", website=True)
def blog_feed(self, blog, limit='15', **kwargs):
v = {}
v['blog'] = blog