From cc1e7dce25cd3648af80baba912ed520f8b46997 Mon Sep 17 00:00:00 2001 From: "Nasreddin (bon)" Date: Tue, 4 Aug 2020 14:44:54 +0000 Subject: [PATCH] [FIX] mail: User following task can't add another follower Issue - Login as Mitchell Admin - In Projects module, Create a new project - Set Visibility to 'Invited employees' - Create new task and assign it to Mitchell Admin - Edit the task and add Marc Demo as follower - Login as Marc Demo - Go to the task previously created - Add an other follower IrRule Error Solution Use sudo() to find all followers of a document. opw-2303443 closes odoo/odoo#55521 X-original-commit: e0d064ffe4013ed727bdc780a3d0a7c6b16e6e9c Signed-off-by: Simon Goffin (sig) Signed-off-by: bon-odoo --- addons/mail/wizard/invite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/wizard/invite.py b/addons/mail/wizard/invite.py index 3d96ebe25b6..610b1a0dd3e 100644 --- a/addons/mail/wizard/invite.py +++ b/addons/mail/wizard/invite.py @@ -56,7 +56,7 @@ class Invite(models.TransientModel): document = Model.browse(wizard.res_id) # filter partner_ids to get the new followers, to avoid sending email to already following partners - new_partners = wizard.partner_ids - document.message_partner_ids + new_partners = wizard.partner_ids - document.sudo().message_partner_ids new_channels = wizard.channel_ids - document.message_channel_ids document.message_subscribe(new_partners.ids, new_channels.ids)