From eb7a098592294425e7f229fca080ae15f56c3317 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Thu, 12 Oct 2017 11:39:43 +0200 Subject: [PATCH] [FIX] website_hr_recruitment: Avoid exponential sitemap generation Purpose ======= Currently all the possible routes for /jobs are put in the sitemap. Each time you create a job, you add at least 250 links in the sitmap (The country can be set on the route) Specification ============= This commit backports the behavior of this commit in v11.0 (https://github.com/odoo/odoo/commit/1b52b00d2aa96b9360d50a0f0960f1febb5e607e) Don't generate sitemap entries for other routes than /jobs/ --- addons/website_hr_recruitment/controllers/main.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/website_hr_recruitment/controllers/main.py b/addons/website_hr_recruitment/controllers/main.py index 71968b3d850..a74fd9d4631 100644 --- a/addons/website_hr_recruitment/controllers/main.py +++ b/addons/website_hr_recruitment/controllers/main.py @@ -6,16 +6,17 @@ from odoo.addons.website.models.website import slug from odoo.http import request +# NB: DO NOT FORWARD PORT THE FALSY LEAVES IN 11.0 class WebsiteHrRecruitment(http.Controller): @http.route([ '/jobs', - '/jobs/country/', - '/jobs/department/', - '/jobs/country//department/', + '''/jobs/country//department/', - '/jobs/country//office/', - '/jobs/department//office/', - '/jobs/country//department//office/', + '''/jobs/country//department/