[FIX] mail_thread: when reading subscription data, add a protection

against not planned subtype data (coming from error in subtype relationship
table, or for undisplayed subtypes, old subtypes, ...).

bzr revid: tde@openerp.com-20140225090637-mnztroc05nk7l2sl
This commit is contained in:
Thibault Delavallée 2014-02-25 10:06:37 +01:00
parent cde82643d0
commit 700bbfcce1
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ class mail_thread(osv.AbstractModel):
], context=context)
for fol in fol_obj.browse(cr, uid, fol_ids, context=context):
thread_subtype_dict = res[fol.res_id]['message_subtype_data']
for subtype in fol.subtype_ids:
for subtype in [st for st in fol.subtype_ids if st.name in thread_subtype_dict]:
thread_subtype_dict[subtype.name]['followed'] = True
res[fol.res_id]['message_subtype_data'] = thread_subtype_dict