Browse Source

[FIX] mail_optional_folowwer_notification: Propagate parameters to super

[FIX] mail_optional_follower_notification: tests
pull/63/head
Laurent Mignon (ACSONE) 8 years ago
committed by Laurent Mignon
parent
commit
a053eccc01
  1. 2
      mail_optional_follower_notification/models/res_partner.py
  2. 4
      mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py

2
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)

4
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)
Loading…
Cancel
Save