[IMP] Now partner name is displayed as per the record and added a new template.

bzr revid: psa@tinyerp.com-20130314134122-gedt3b9eq5kolnlt
This commit is contained in:
Paramjit Singh Sahota 2013-03-14 19:11:22 +05:30
parent 486f4eae70
commit f242c87c7e
2 changed files with 12 additions and 4 deletions

View File

@ -84,12 +84,12 @@ openerp_mail_followers = function(session, mail) {
var self = this;
var records = [];
var partner_id = $(event.target).data('id');
var partner_name = $(event.target).siblings('a').text();
var id = this.view.datarecord.id;
var res_model = this.view.dataset.model;
console.log('thissssssssssssssss>>', this, id, partner_id);
var $dialog = session.web.dialog($('<div>'), {
modal: true,
title: partner_id,
title: _t('Edit Subtypes of ') + '"' + partner_name + '"',
buttons: [
{text: _t("Apply"), click: function() {
// self.apply_subtype(id, partner_id);
@ -109,8 +109,7 @@ openerp_mail_followers = function(session, mail) {
_(records).each(function (record, record_name) {
record.name = record_name;
record.followed = record.followed || undefined;
console.log('record??????????????', record);
$(session.web.qweb.render("mail.followers.subtype", {'record': record})).appendTo($dialog);
$(session.web.qweb.render("mail.followers.edit.subtype", {'record': record})).appendTo($dialog);
});
});

View File

@ -50,6 +50,15 @@
</table>
</t>
<t t-name="mail.followers.edit.subtype">
<table class='oe_subtype'>
<tr>
<td width="10%"><input type="checkbox" t-att-checked="record.followed" t-att-id="'input_mail_followers_edit_subtype_'+record.id" t-att-data-id="record.id" t-att-name="record.name" class="oe_msg_subtype_check"/></td>
<td><label t-att-for="'input_mail_followers_edit_subtype_'+record.id"><t t-raw="record.name"/></label></td>
</tr>
</table>
</t>
<t t-name="mail.followers.show_more">
<div class="oe_partner oe_show_more">And <t t-raw="number"/> more.</div>
</t>