[IMP] arrenge subtype

bzr revid: fka@tinyerp.com-20121120120503-xl0wucde6ve7fnq3
This commit is contained in:
Foram Katharotiya (OpenERP) 2012-11-20 17:35:03 +05:30
parent b506f96897
commit a12d901e9c
1 changed files with 5 additions and 0 deletions

View File

@ -193,11 +193,16 @@ openerp_mail_followers = function(session, mail) {
/** Display subtypes: {'name': default, followed} */
display_subtypes:function (data) {
var self = this;
var subtype = [];
var subtype_list_ul = this.$('.oe_subtype_list');
var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data;
_(records).each(function (record, record_name) {
record.name = record_name;
record.followed = record.followed || undefined;
subtype.push(record);
})
subtype.sort(function(a,b){return a.id - b.id});
_(subtype).each(function (record) {
$(session.web.qweb.render('mail.followers.subtype', {'record': record})).appendTo( self.$('.oe_subtype_list') );
});
},