diff --git a/mail_optional_follower_notification/models/res_partner.py b/mail_optional_follower_notification/models/res_partner.py index 4c7e53f4..9c920295 100644 --- a/mail_optional_follower_notification/models/res_partner.py +++ b/mail_optional_follower_notification/models/res_partner.py @@ -15,4 +15,4 @@ class ResPartner(models.Model): self.env.context.get('force_partners_to_notify') self = self.filtered(lambda p: p.id in partners_to_notify) super(ResPartner, self)._notify( - message, force_send=False, user_signature=True) + message, force_send=force_send, user_signature=user_signature) diff --git a/mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py b/mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py index 1ca61bfb..b30ab789 100644 --- a/mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py +++ b/mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py @@ -35,7 +35,7 @@ class TestMailOptionalFollowernotifications(common.TransactionCase): self.assertEqual(len(res.ids), 1) message = self.env['mail.message'] for record in res: - if record.notified_partner_ids.ids == [self.partner_03.id] and\ + if record.needaction_partner_ids.ids == [self.partner_03.id] and\ record.partner_ids.ids == [self.partner_03.id]: message += record self.assertEqual(len(message.ids), 0) @@ -48,7 +48,7 @@ class TestMailOptionalFollowernotifications(common.TransactionCase): ('res_id', '=', self.partner_01.id)]) message = self.env['mail.message'] for record in res: - if record.notified_partner_ids.ids == [self.partner_03.id] and\ + if record.needaction_partner_ids.ids == [self.partner_03.id] and\ record.partner_ids.ids == [self.partner_03.id]: message += record self.assertEqual(len(message.ids), 1)