[REM]: Remove vote from message_summary
bzr revid: atp@tinyerp.com-20120809115032-ffl9v3tcqxuktnn9
This commit is contained in:
@@ -64,14 +64,12 @@ class mail_thread(osv.Model):
|
||||
|
||||
def _get_message_ids(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
img_vote = "<img class='oe_mail_vote_image' src='/mail/static/src/img/vote.gif'/>"
|
||||
for id in ids:
|
||||
message_ids = self.message_search(cr, uid, [id], context=context)
|
||||
subscriber_ids = self.message_get_subscribers(cr, uid, [id], context=context)
|
||||
vote_list = self.message_vote_ids(cr, uid, message_ids, context=context)
|
||||
res[id] = {
|
||||
'message_ids': message_ids,
|
||||
'message_summary': "<span><span class='oe_e'>9</span> %d</span> <span><span class='oe_e'>+</span> %d</span> <span> %s %d</span>" % (len(message_ids), len(subscriber_ids), img_vote, len(vote_list)),
|
||||
'message_summary': "<span><span class='oe_e'>9</span> %d</span> <span><span class='oe_e'>+</span> %d</span>" % (len(message_ids), len(subscriber_ids)),
|
||||
}
|
||||
return res
|
||||
|
||||
@@ -102,13 +100,6 @@ class mail_thread(osv.Model):
|
||||
#------------------------------------------------------
|
||||
# Automatic subscription when creating/reading
|
||||
#------------------------------------------------------
|
||||
def message_vote_ids(self, cr, uid, ids, context=None):
|
||||
message_pool = self.pool.get('mail.message')
|
||||
vote_list = []
|
||||
for message in message_pool.browse(cr, uid, ids, context=context):
|
||||
if message.vote_ids:
|
||||
vote_list.append(message.vote_ids)
|
||||
return vote_list
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
"""Automatically subscribe the creator """
|
||||
|
||||
Reference in New Issue
Block a user