From b67bf4eaa3be0f8d041ddd8d8f8ca43718731f6e Mon Sep 17 00:00:00 2001 From: "Adrien Peiffer (ACSONE)" Date: Fri, 20 Oct 2017 17:42:56 +0200 Subject: [PATCH] [FIX] mail_optional_follower_notification: Check force_partners_to_notify instead of notify_followers. Without this commit, followers are NEVER notified when a message is directly posted on the tracker (without click to open the mail compose message form) --- mail_optional_follower_notification/__manifest__.py | 2 +- mail_optional_follower_notification/models/mail_message.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mail_optional_follower_notification/__manifest__.py b/mail_optional_follower_notification/__manifest__.py index 848dc736..3453dec5 100644 --- a/mail_optional_follower_notification/__manifest__.py +++ b/mail_optional_follower_notification/__manifest__.py @@ -11,7 +11,7 @@ 'Odoo Community Association (OCA)', 'website': "http://acsone.eu", 'category': 'Social Network', - 'version': '10.0.1.0.0', + 'version': '10.0.1.0.1', 'license': 'AGPL-3', 'depends': [ 'mail', diff --git a/mail_optional_follower_notification/models/mail_message.py b/mail_optional_follower_notification/models/mail_message.py index 84666b68..ea684e46 100644 --- a/mail_optional_follower_notification/models/mail_message.py +++ b/mail_optional_follower_notification/models/mail_message.py @@ -24,7 +24,8 @@ class MailMessage(models.Model): res = super(MailMessage, self)._notify( force_send=force_send, send_after_commit=send_after_commit, user_signature=user_signature) - if not self.env.context.get('notify_followers'): + if self.env.context.get('force_partners_to_notify'): # Needaction only for recipients - self.needaction_partner_ids = [(6, 0, self.partner_ids.ids)] + self.needaction_partner_ids = [ + (6, 0, self.env.context.get('force_partners_to_notify'))] return res