From 158b5d2c77dc254189d0d5064381fcc05c54bcb4 Mon Sep 17 00:00:00 2001 From: Vincent Larcin Date: Wed, 7 Sep 2022 09:14:09 +0000 Subject: [PATCH] [IMP] project: add project id to task values in portal This commit adds the id of the project to the task values sent to the front end in the portal. This allows us to easily know which project the task is in from the front end and direct the user to the right documents pages. Enterprise: odoo/enterprise#30838 Upgrade: odoo/upgrade#3749 Task-2944247 closes odoo/odoo#99151 Signed-off-by: Laurent Stukkens (ltu) --- addons/project/controllers/portal.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/project/controllers/portal.py b/addons/project/controllers/portal.py index 796bc2c4b80..479189c493a 100644 --- a/addons/project/controllers/portal.py +++ b/addons/project/controllers/portal.py @@ -248,6 +248,8 @@ class ProjectCustomerPortal(CustomerPortal): 'project_accessible': project_accessible, 'task_link_section': [], } + if project: + values['project_id'] = project.id return self._get_page_view_values(task, access_token, values, history, False, **kwargs) def _task_get_searchbar_sortings(self, milestones_allowed):