From ae1e7ed05ea50528b4ab6deaa36602334437220f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 10 Apr 2014 11:51:43 +0200 Subject: [PATCH] [FIX] mail_thread: when the subtype does not exist anymore, avoid crashing message_post; just ignore the subtype instead. bzr revid: tde@openerp.com-20140410095143-05qpe3m2pbeg3fg5 --- addons/mail/mail_thread.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index f2d33be7787..73588207d6a 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -1511,8 +1511,7 @@ class mail_thread(osv.AbstractModel): if subtype: if '.' not in subtype: subtype = 'mail.%s' % subtype - ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, *subtype.split('.')) - subtype_id = ref and ref[1] or False + subtype_id = self.pool.get('ir.model.data').xmlid_to_res_id(cr, uid, subtype) # automatically subscribe recipients if asked to if context.get('mail_post_autofollow') and thread_id and partner_ids: