[FIX] mail: specific message subscribe
`write` expects a `dict` for the `values` argument, `part[record.id]` is a list of commands to add new followers. See the returned variable `specific` of the method `_add_follower_command` in `mail_followers.py`. Surrounding `part[record.id]` with a `dict` with `message_follower_ids` has probably been forgotten by oversight. `gen` and `part[record.id]` have actualy the same syntax, and the `write` done with these variables should therefore be called the same way. opw-669376
This commit is contained in:
@@ -1807,7 +1807,7 @@ class MailThread(models.AbstractModel):
|
||||
gen, part = self.env['mail.followers']._add_follower_command(self._name, self.ids, partner_data, channel_data, force=force)
|
||||
self.sudo().write({'message_follower_ids': gen})
|
||||
for record in self.filtered(lambda self: self.id in part):
|
||||
record.write(part[record.id])
|
||||
record.write({'message_follower_ids': part[record.id]})
|
||||
|
||||
self.invalidate_cache()
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user