[REF] mail: refactored tracked feature. It is now based on a dict defined at model...
[odoo/odoo.git] / addons / mail / mail_message_subtype.py
1 # -*- coding: utf-8 -*-
2 ##############################################################################
3 #
4 #    OpenERP, Open Source Management Solution
5 #    Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
6 #
7 #    This program is free software: you can redistribute it and/or modify
8 #    it under the terms of the GNU Affero General Public License as
9 #    published by the Free Software Foundation, either version 3 of the
10 #    License, or (at your option) any later version
11 #
12 #    This program is distributed in the hope that it will be useful,
13 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #    GNU Affero General Public License for more details
16 #
17 #    You should have received a copy of the GNU Affero General Public License
18 #    along with this program.  If not, see <http://www.gnu.org/licenses/>
19 #
20 ##############################################################################
21
22 from openerp.osv import osv
23 from openerp.osv import fields
24
25
26 class mail_message_subtype(osv.osv):
27     """ Class holding subtype definition for messages. Subtypes allow to tune
28         the follower subscription, allowing only some subtypes to be pushed
29         on the Wall. """
30     _name = 'mail.message.subtype'
31     _description = 'Message subtypes'
32     _columns = {
33         'name': fields.char('Message Type', required=True, translate=True,
34             help='Message subtype gives a more precise type on the message, '\
35                     'especially for system notifications. For example, it can be '\
36                     'a notification related to a new record (New), or to a stage '\
37                     'change in a process (Stage change). Message subtypes allow to '\
38                     'precisely tune the notifications the user want to receive on its wall.'),
39         'description': fields.text('Description', translate=True,
40             help='Description that will be added in the message posted for this '\
41                     'subtype. If void, no message will be added.'),
42         'res_model': fields.char('Model',
43             help="Model the subtype applies to. If False, this subtype exists for all models."),
44         'default': fields.boolean('Default',
45             help="Activated by default when subscribing."),
46     }
47     _defaults = {
48         'default': True,
49     }