diff --git a/addons/project/models/project_project.py b/addons/project/models/project_project.py index de12d14ffe2..576ae434fa7 100644 --- a/addons/project/models/project_project.py +++ b/addons/project/models/project_project.py @@ -579,6 +579,7 @@ class Project(models.Model): action['context'] = { 'default_project_id': self.id, 'delete': False, + 'active_id_chatter': self.id, } action['display_name'] = self.name return action diff --git a/addons/project/static/src/project_sharing/views/form/project_sharing_form_compiler.js b/addons/project/static/src/project_sharing/views/form/project_sharing_form_compiler.js index ee9c8b0386a..8e325e96574 100644 --- a/addons/project/static/src/project_sharing/views/form/project_sharing_form_compiler.js +++ b/addons/project/static/src/project_sharing/views/form/project_sharing_form_compiler.js @@ -65,7 +65,7 @@ export class ProjectSharingChatterCompiler extends ViewCompiler { return compileChatter(node, { resId: '__comp__.model.root.resId or undefined', resModel: '__comp__.model.root.resModel', - projectSharingId: '__comp__.model.root.context.active_id', + projectSharingId: '__comp__.model.root.context.active_id_chatter', }); } } @@ -76,7 +76,7 @@ registry.category("form_compilers").add("portal_chatter_compiler", { compileChatter(node, { resId: "__comp__.props.record.resId or undefined", resModel: "__comp__.props.record.resModel", - projectSharingId: "__comp__.props.record.context.active_id", + projectSharingId: "__comp__.props.record.context.active_id_chatter", }), });