From 1e5432edecf88ac86d1d9c057c4aa10112e59f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 6 Dec 2013 11:11:17 +0100 Subject: [PATCH] [FIX] mail: fixed subtype check broken by get_object refactoring, should be fixed now + updated other call to get_object bzr revid: tde@openerp.com-20131206101117-atlch4ea102a4gx0 --- addons/mail/mail_thread.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index aebb7dab949..adb097c9b2b 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -165,7 +165,7 @@ class mail_thread(osv.AbstractModel): def read_followers_data(self, cr, uid, follower_ids, context=None): result = [] - technical_group = self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'group_no_one') + technical_group = self.pool.get('ir.model.data').get_object(cr, uid, 'base', 'group_no_one', context=context, check_existence_and_raise=True) for follower in self.pool.get('res.partner').browse(cr, uid, follower_ids, context=context): is_editable = uid in map(lambda x: x.id, technical_group.users) is_uid = uid in map(lambda x: x.id, follower.user_ids) @@ -496,9 +496,9 @@ class mail_thread(osv.AbstractModel): posted = False for subtype in subtypes: - subtype_rec = self.pool.get('ir.model.data').get_object(cr, uid, subtype.split('.')[0], subtype.split('.')[1], context=context) + subtype_rec = self.pool.get('ir.model.data').get_object(cr, uid, subtype.split('.')[0], subtype.split('.')[1], context=context, check_existence_and_raise=False) if not subtype_rec.exists(): - _logger.debug('subtype %s not found, giving error "%s"' % (subtype, e)) + _logger.debug('subtype %s not found' % subtype) continue message = format_message(subtype_rec.description if subtype_rec.description else subtype_rec.name, tracked_values) self.message_post(cr, uid, browse_record.id, body=message, subtype=subtype, context=context)