[FIX] mail followers: count the number of subtype for display more of 1 subtype

bzr revid: chm@openerp.com-20121227103701-fhn5f25nbtqf2uea
This commit is contained in:
Christophe Matthieu
2012-12-27 11:37:01 +01:00
parent 61bff67159
commit 31b11163fa
+3 -1
View File
@@ -218,7 +218,9 @@ openerp_mail_followers = function(session, mail) {
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;
if (records.length > 1) {
var nb_subtype = 0;
_(records).each(function (record) {nb_subtype++;});
if (nb_subtype > 1) {
_(records).each(function (record, record_name) {
record.name = record_name;
record.followed = record.followed || undefined;