[IMP] Improved code and removed unwanted 'None'.
bzr revid: psa@tinyerp.com-20130409043932-z5c8hupbhrednwa0
This commit is contained in:
parent
e61d6bae16
commit
1769067ddd
|
@ -111,7 +111,7 @@ class mail_group(osv.Model):
|
|||
partner_ids = []
|
||||
for group in mail_group.group_ids:
|
||||
partner_ids += [user.partner_id.id for user in group.users]
|
||||
self.message_subscribe(cr, uid, ids, partner_ids, None, context=context)
|
||||
self.message_subscribe(cr, uid, ids, partner_ids, context=context)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
mail_alias = self.pool.get('mail.alias')
|
||||
|
|
|
@ -1227,7 +1227,7 @@ class mail_thread(osv.AbstractModel):
|
|||
|
||||
for pid, subtypes in new_followers.items():
|
||||
subtypes = list(subtypes) if subtypes is not None else None
|
||||
self.message_subscribe(cr, uid, [record.id], [pid], None, subtypes, context=context)
|
||||
self.message_subscribe(cr, uid, [record.id], [pid], subtypes, context=context)
|
||||
|
||||
# find first email message, set it as unread for auto_subscribe fields for them to have a notification
|
||||
if user_id_partner_ids:
|
||||
|
|
|
@ -297,13 +297,14 @@ openerp_mail_followers = function(session, mail) {
|
|||
checklist.push(parseInt($(record).data('id')));
|
||||
}
|
||||
});
|
||||
|
||||
if (!checklist.length) {
|
||||
if (!this.do_unfollow()) {
|
||||
$(event.target).attr("checked", "checked");
|
||||
}
|
||||
} else {
|
||||
var context = new session.web.CompoundContext(this.build_context(), {});
|
||||
return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], partner_id, checklist, context])
|
||||
return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], checklist, partner_id, context])
|
||||
.then(this.proxy('read_value'));
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue