From 55aa065a4033acfa3585e98e3b546ad7286ee43d Mon Sep 17 00:00:00 2001 From: Jeremy Kersten <jke@odoo.com> Date: Mon, 15 Feb 2016 15:28:56 +0100 Subject: [PATCH] [FIX] website_crm_partner_assign: return 404 if not partners found SEO : Avoid to have Soft 404 --- addons/website_crm_partner_assign/controllers/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_crm_partner_assign/controllers/main.py b/addons/website_crm_partner_assign/controllers/main.py index a16d26bcc467..9345de368642 100644 --- a/addons/website_crm_partner_assign/controllers/main.py +++ b/addons/website_crm_partner_assign/controllers/main.py @@ -131,7 +131,8 @@ class WebsiteCrmPartnerAssign(WebsitePartnerPage): 'searches': post, 'search_path': "%s" % werkzeug.url_encode(post), } - return request.website.render("website_crm_partner_assign.index", values) + return request.render("website_crm_partner_assign.index", values, status=partners and 200 or 404) + # Do not use semantic controller due to SUPERUSER_ID @http.route(['/partners/<partner_id>'], type='http', auth="public", website=True) -- GitLab