From 26d6e83881ed96ea41ec3cf7d7c052a14221cf14 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Fri, 12 Feb 2016 13:49:11 +0100 Subject: [PATCH] [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 --- addons/mail/models/mail_thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_thread.py b/addons/mail/models/mail_thread.py index ad0b2bef16a..8dc0c719f7a 100644 --- a/addons/mail/models/mail_thread.py +++ b/addons/mail/models/mail_thread.py @@ -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