From a053eccc01d656883e440f98c345e1032a15ad9d Mon Sep 17 00:00:00 2001 From: "Laurent Mignon (ACSONE)" Date: Mon, 24 Oct 2016 10:34:28 +0200 Subject: [PATCH] [FIX] mail_optional_folowwer_notification: Propagate parameters to super [FIX] mail_optional_follower_notification: tests --- mail_optional_follower_notification/models/res_partner.py | 2 +- .../tests/test_mail_optional_follower_notifications.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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)