[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) <sig@openerp.com> Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user