From 48733540e10e396207b3cbf1cf9fc0bae67782d3 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 21 Jan 2013 09:53:11 +0100 Subject: [PATCH] [FIX] mail_followers: bug-1100691 bzr revid: chm@openerp.com-20130121085311-n1nwcmviykdp7u0o --- addons/mail/static/src/js/mail_followers.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 9f88116acc7..03351c24ac2 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -216,9 +216,12 @@ openerp_mail_followers = function(session, mail) { display_subtypes:function (data) { var self = this; var subtype_list_ul = this.$('.oe_subtype_list'); - subtype_list_ul.empty(); - var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data; + var records = []; var nb_subtype = 0; + subtype_list_ul.empty(); + if (this.view.datarecord.id) { + records = data[this.view.datarecord.id].message_subtype_data; + } _(records).each(function (record) {nb_subtype++;}); if (nb_subtype > 1) { this.$('hr').show();