[FIX] mail.thread: avoid error if `message_unread_count` has been popped 1 line earlier

bzr revid: odo@openerp.com-20140314104605-qi7eqj2g37dvxvc3
This commit is contained in:
Olivier Dony 2014-03-14 11:46:05 +01:00
parent 44a99c0976
commit 9e002d9233
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class mail_thread(osv.AbstractModel):
if res[id]['message_unread_count']:
title = res[id]['message_unread_count'] > 1 and _("You have %d unread messages") % res[id]['message_unread_count'] or _("You have one unread message")
res[id]['message_summary'] = "<span class='oe_kanban_mail_new' title='%s'><span class='oe_e'>9</span> %d %s</span>" % (title, res[id].pop('message_unread_count'), _("New"))
res[id].pop('message_unread_count') # remove internal value
res[id].pop('message_unread_count', None)
return res
def _get_subscription_data(self, cr, uid, ids, name, args, context=None):