From caba5db34bb9d6a4f91127c063293aae3be13780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 19 Apr 2012 18:20:50 +0200 Subject: [PATCH] [ADD] mail.message: added a message_subtype field, that will contain more precise data about the type of content. Example: create, cancel, ... Purpose: being able to filter (hide) a given content type. bzr revid: tde@openerp.com-20120419162050-6uq495s94i4etnbp --- addons/mail/mail_message.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 5d5d599be0e..9228861b139 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -206,6 +206,12 @@ class mail_message(osv.osv): ('comment', 'Comment'), ('notification', 'System notification'), ], 'Type', help="Message type: e-mail for e-mail message, notification for system message, comment for other messages such as user replies"), + 'message_subtype': fields.selection([ + ('email', 'e-mail'), + ('comment', 'Comment'), + ('create', 'Create'), + ('cancel', 'Cancel'), + ], 'Type', help="Message subtype, such as create or cancel. May be overriden by addons."), 'partner_id': fields.many2one('res.partner', 'Related partner'), 'user_id': fields.many2one('res.users', 'Related user', readonly=1), 'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments'), @@ -224,6 +230,7 @@ class mail_message(osv.osv): _defaults = { 'type': 'email', + 'message_subtype': 'email', 'state': 'received', }