[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
This commit is contained in:
Thibault Delavallée
2012-04-19 18:20:50 +02:00
parent ae0dbd2145
commit caba5db34b
+7
View File
@@ -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',
}