From 336befc0fbdf8f24cedcb37ef7d4684aea50885c Mon Sep 17 00:00:00 2001 From: "Xavier BOL (xbo)" Date: Tue, 28 Sep 2021 12:48:10 +0200 Subject: [PATCH] [FIX] project: add route to manage page in '/my/projects/:project_id' Before this commit, we recently change the content of this route. The content is the list of tasks to the project instead of the form view of the project. The problem is we don't have a route to manage the page in the case where we have more than the value stored in `_items_per_page`. This commit adds a route in the method for '/my/projects/:project_id' route. The new route is called '/my/projects/:project_id/page/:page' to manage the page of the tasks linked to the project. task-2648955 Closes #82379 --- addons/project/controllers/portal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/controllers/portal.py b/addons/project/controllers/portal.py index 828f3e64a56..a6a5e1bbf7b 100644 --- a/addons/project/controllers/portal.py +++ b/addons/project/controllers/portal.py @@ -103,7 +103,7 @@ class ProjectCustomerPortal(CustomerPortal): """ Redirect the outdated routes to the new routes. """ return request.redirect(request.httprequest.path.replace('/my/task', '/my/tasks')) - @http.route(['/my/projects/'], type='http', auth="public", website=True) + @http.route(['/my/projects/', '/my/projects//page/'], type='http', auth="public", website=True) def portal_my_project(self, project_id=None, access_token=None, page=1, date_begin=None, date_end=None, sortby=None, search=None, search_in='content', groupby=None, task_id=None, **kw): try: project_sudo = self._document_check_access('project.project', project_id, access_token)