diff --git a/mail_optional_follower_notification/models/mail_message.py b/mail_optional_follower_notification/models/mail_message.py index fe64abc0..fb2a98a3 100644 --- a/mail_optional_follower_notification/models/mail_message.py +++ b/mail_optional_follower_notification/models/mail_message.py @@ -17,3 +17,13 @@ class MailMessage(models.Model): force_partners_to_notify = [d['id'] for d in partner_list] ctx['force_partners_to_notify'] = force_partners_to_notify return super(MailMessage, self.with_context(ctx)).create(values) + + @api.multi + def _notify(self, force_send=False, user_signature=True): + res = super(MailMessage, self)._notify( + force_send=force_send, user_signature=user_signature) + if self.env.context.get('force_partners_to_notify'): + # Needaction only for recipients + self.needaction_partner_ids = [ + (6, 0, self.env.context.get('force_partners_to_notify'))] + return res