diff --git a/addons/website_hr_recruitment/controllers/main.py b/addons/website_hr_recruitment/controllers/main.py index 62877fd7c65..424a0699760 100644 --- a/addons/website_hr_recruitment/controllers/main.py +++ b/addons/website_hr_recruitment/controllers/main.py @@ -3,6 +3,7 @@ import warnings from datetime import datetime, timedelta +from werkzeug.urls import url_encode from odoo import http, _ from odoo.addons.http_routing.models.ir_http import slug @@ -271,12 +272,16 @@ class WebsiteHrRecruitment(http.Controller): "This route is deprecated since Odoo 16.3: the jobs list is now available at /jobs or /jobs/page/XXX", DeprecationWarning ) - return self.jobs( - country_id=country.id if country else None, - department_id=department.id if department else None, - office_id=office_id, - contract_type_id=contract_type_id, - **kwargs + url_params = { + 'country_id': country and country.id, + 'department_id': department and department.id, + 'office_id': office_id, + 'contract_type_id': contract_type_id, + **kwargs, + } + return request.redirect( + '/jobs?%s' % url_encode(url_params), + code=301, ) @http.route('/website_hr_recruitment/check_recent_application', type='json', auth="public")