Skip to content
Snippets Groups Projects
Commit 2ccfa8ce authored by Bastien (bvdn)'s avatar Bastien (bvdn)
Browse files

[FIX] project: avoid traceback on stat button click


- steps to reproduce bug:
  In project.task sharing form view, When clicking on any of the stat buttons (subtasks or parent task)
  when you arrive on the actual task formview a MissingError saying 'missing record' appears
- Issue:
  The record loads accordingly but the Missing Error shouldn't appear

- Cause:
  It is coming from the project_sharing_form_compiler which gave the projectSharingId props to the ChatterContainer element
  but the projectSharingId is equal to the "props.record.context.active_id" of the action, and in the context of the
  chatter we want the active_id to be equal to the project_id, which was the case when we are coming from the KanbanView and
  sub-list views but when coming from the task stat button the active_id is equal to the task_id and the env can't find
  the document 'project.project' with the id of the task. (in portal.py _document_check_access())
- Fix:
  We simply change the projectSharingId to take the "props.record.contect.active_id_chatter" the give an
  active_id_chatter= active_id in the Project Sharing task_action which will always equal the Id of the project

Task-3284755

closes odoo/odoo#119832

Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
parent 142684db
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment