[REF] mail_thread: removed get_subscribers, because not necessary anymore with the new field.
bzr revid: tde@openerp.com-20120815200715-075no768khroyyoe
This commit is contained in:
parent
6d6929a863
commit
af44478ff3
|
@ -292,7 +292,9 @@ class mail_thread(osv.Model):
|
||||||
body = new_msg_vals.get('body_html', '') if new_msg_vals.get('content_subtype') == 'html' else new_msg_vals.get('body_text', '')
|
body = new_msg_vals.get('body_html', '') if new_msg_vals.get('content_subtype') == 'html' else new_msg_vals.get('body_text', '')
|
||||||
|
|
||||||
# get subscribers
|
# get subscribers
|
||||||
notif_user_ids = self.message_get_subscribers(cr, uid, thread_ids, context=context)
|
subscr_obj = self.pool.get('mail.followers')
|
||||||
|
subscr_ids = subscr_obj.search(cr, uid, ['&', ('res_model', '=', self._name), ('res_id', 'in', ids)], context=context)
|
||||||
|
notif_user_ids = [sub['user_id'][0] for sub in subscr_obj.read(cr, uid, subscr_ids, ['user_id'], context=context)]
|
||||||
|
|
||||||
# add users requested to perform an action (need_action mechanism)
|
# add users requested to perform an action (need_action mechanism)
|
||||||
if hasattr(self, 'get_needaction_user_ids') and self._columns.get('user_id'):
|
if hasattr(self, 'get_needaction_user_ids') and self._columns.get('user_id'):
|
||||||
|
@ -999,15 +1001,6 @@ class mail_thread(osv.Model):
|
||||||
"""
|
"""
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def message_get_subscribers(self, cr, uid, ids, context=None):
|
|
||||||
""" Returns the current document followers. Basically this method
|
|
||||||
checks in mail.followers for entries with matching res_model,
|
|
||||||
res_id.
|
|
||||||
"""
|
|
||||||
subscr_obj = self.pool.get('mail.followers')
|
|
||||||
subscr_ids = subscr_obj.search(cr, uid, ['&', ('res_model', '=', self._name), ('res_id', 'in', ids)], context=context)
|
|
||||||
return [sub['user_id'][0] for sub in subscr_obj.read(cr, uid, subscr_ids, ['user_id'], context=context)]
|
|
||||||
|
|
||||||
def message_subscribe(self, cr, uid, ids, user_ids = None, context=None):
|
def message_subscribe(self, cr, uid, ids, user_ids = None, context=None):
|
||||||
""" Subscribe the user (or user_ids) to the current document.
|
""" Subscribe the user (or user_ids) to the current document.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue