diff options
Diffstat (limited to 'addons/mail/models')
| -rw-r--r-- | addons/mail/models/mail_channel.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index ab5033c4642..9781823ad20 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -322,6 +322,9 @@ class Channel(models.Model): return self._action_unfollow(self.env.user.partner_id) def _action_unfollow(self, partner): + self.message_unsubscribe(partner.ids) + if partner not in self.with_context(active_test=False).channel_partner_ids: + return True channel_info = self.channel_info('unsubscribe')[0] # must be computed before leaving the channel (access rights) result = self.write({'channel_partner_ids': [(3, partner.id)]}) # side effect of unsubscribe that wasn't taken into account because |
