[FIX] mail.message: all recipients explicitly mentioned should receive a notification...
authorOlivier Dony <odo@openerp.com>
Thu, 20 Dec 2012 18:20:04 +0000 (19:20 +0100)
committerOlivier Dony <odo@openerp.com>
Thu, 20 Dec 2012 18:20:04 +0000 (19:20 +0100)
The above revision(s) will be removed.

bzr revid: odo@openerp.com-20121220182004-460168pd9rofbpgw

1  2 
addons/email_template/tests/test_mail.py
addons/mail/mail_message.py

@@@ -165,6 -165,6 +165,7 @@@ class test_message_compose(TestMailBase
          message_pigs_pids = [partner.id for partner in message_pigs.notified_partner_ids]
          message_bird_pids = [partner.id for partner in message_bird.notified_partner_ids]
          partner_ids = self.res_partner.search(cr, uid, [('email', 'in', ['b@b.b', 'c@c.c', 'd@d.d'])])
++        partner_ids.append(p_a_id)
          self.assertEqual(set(message_pigs_pids), set(partner_ids), 'mail.message on pigs incorrect number of notified_partner_ids')
          self.assertEqual(set(message_bird_pids), set(partner_ids), 'mail.message on bird notified_partner_ids incorrect')
  
@@@ -849,9 -849,6 +849,7 @@@ class mail_message(osv.Model)
          # message has no subtype_id: pure log message -> no partners, no one notified
          if not message.subtype_id:
              return True
-         # all partner_ids of the mail.message have to be notified
-         if message.partner_ids:
-             partners_to_notify |= set(message.partner_ids)
++            
          # all followers of the mail.message document have to be added as partners and notified
          if message.model and message.res_id:
              fol_obj = self.pool.get("mail.followers")