From e0fa7da24fc25be4f0a83572018d900dc6ca24c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 27 Nov 2012 15:35:20 +0100 Subject: [PATCH] [REM] mail_thread: removed field message_comment_ids, not really necessary. In message_summary, we display the true number of messages, not only comment number. This is more consistent with what you will see in Chatter, aka all messages. bzr revid: tde@openerp.com-20121127143520-cv4os3dosrqo01wb --- addons/mail/mail_thread.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index dce5bc861e4..096d7d71045 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -88,7 +88,7 @@ class mail_thread(osv.AbstractModel): for thread in self.browse(cr, uid, ids, context=context): cls = res[thread.id]['message_unread'] and ' class="oe_kanban_mail_new"' or '' - res[thread.id]['message_summary'] = "9 %d + %d" % (cls, len(thread.message_comment_ids), len(thread.message_follower_ids)) + res[thread.id]['message_summary'] = "9 %d + %d" % (cls, len(thread.message_ids), len(thread.message_follower_ids)) return res @@ -198,10 +198,6 @@ class mail_thread(osv.AbstractModel): 'message_follower_ids': fields.function(_get_followers, fnct_inv=_set_followers, fnct_search=_search_followers, type='many2many', obj='res.partner', string='Followers', multi='_get_followers'), - 'message_comment_ids': fields.one2many('mail.message', 'res_id', - domain=lambda self: [('model', '=', self._name), ('type', 'in', ('comment', 'email'))], - string='Comments and emails', - help="Comments and emails"), 'message_ids': fields.one2many('mail.message', 'res_id', domain=lambda self: [('model', '=', self._name)], string='Messages', @@ -243,7 +239,6 @@ class mail_thread(osv.AbstractModel): def copy(self, cr, uid, id, default=None, context=None): default = default or {} default['message_ids'] = [] - default['message_comment_ids'] = [] default['message_follower_ids'] = [] return super(mail_thread, self).copy(cr, uid, id, default=default, context=context)