[FIX] mail_thread: fixed message_subtype wrongly taken into account when posting...
authorThibault Delavallée <tde@openerp.com>
Wed, 14 Nov 2012 14:35:06 +0000 (15:35 +0100)
committerThibault Delavallée <tde@openerp.com>
Wed, 14 Nov 2012 14:35:06 +0000 (15:35 +0100)
bzr revid: tde@openerp.com-20121114143506-qcmhrcngfxm4tbvu

addons/mail/mail_thread.py

index 8112015..99ce2bd 100644 (file)
@@ -758,7 +758,7 @@ class mail_thread(osv.AbstractModel):
                 partner_ids.append((4, parent_message.author_id.id))
 
         message_type = kwargs.pop('type', 'comment')
-        message_subtype = kwargs.pop('type', 'mail.mt_comment')
+        message_subtype = kwargs.pop('subtype', 'mail.mt_comment')
 
         # 2. Post message
         new_message_id = self.message_post(cr, uid, thread_id=thread_id, body=body, subject=subject, type=message_type,