[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
This commit is contained in:
@@ -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/<int:project_id>'], type='http', auth="public", website=True)
|
||||
@http.route(['/my/projects/<int:project_id>', '/my/projects/<int:project_id>/page/<int: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)
|
||||
|
||||
Reference in New Issue
Block a user