From 01a03e10ca17b3fc3e8f95b15bb31df9b0c157dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 4 Apr 2012 13:21:28 +0200 Subject: [PATCH] [IMP] mail.message: added a child_ids relationship on message, linked to parent_id. It will allow to know the number of messages present in a thread, for a better user experience about more buttons. bzr revid: tde@openerp.com-20120404112128-jzc9cogti4ip2glu --- addons/mail/mail_message.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 6afeceb6816..7f0f5bde99a 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -123,6 +123,7 @@ class mail_message_common(osv.osv_memory): help="Content of the message. This content equals the body_text field for plain-test messages, and body_html for rich-text/HTML messages. This allows having one field if we want to access the content matching the message subtype."), 'parent_id': fields.many2one('mail.message', 'Parent message', help="Parent message, used for displaying as threads with hierarchy", select=True, ondelete='set null',), + 'child_ids': fields.one2many('mail.message', 'parent_id', 'Child messages'), } _defaults = {