[FIX] OpenChatter: unknown emails becoming followers was not taken into account when...
authorThibault Delavallée <tde@openerp.com>
Tue, 8 Jan 2013 16:50:10 +0000 (17:50 +0100)
committerThibault Delavallée <tde@openerp.com>
Tue, 8 Jan 2013 16:50:10 +0000 (17:50 +0100)
When having emails not related to a partner in a discussion thread, checkboxes appear that allow to create a partner that will be added as follower to the related document, if any. This now works either in the quik reply box, or the full composer.

bzr revid: tde@openerp.com-20130108165010-hkhd45ube5s081i5

1  2 
addons/mail/mail_thread.py

@@@ -958,6 -980,11 +980,11 @@@ class mail_thread(osv.AbstractModel)
                  param_partner_ids.add(item)
          partner_ids |= param_partner_ids
  
+         # 1.A.3: add parameters recipients as follower
+         # TDE FIXME in 7.1: should check whether this comes from email_list or partner_ids
 -        if param_partner_ids:
++        if param_partner_ids and self._name != 'mail.thread':
+             self.message_subscribe(cr, uid, [thread_id], [pid[1] for pid in param_partner_ids], context=context)
          # 1.B: handle body, message_type and message_subtype
          if content_subtype == 'plaintext':
              body = tools.plaintext2html(body)