[CLEAN] mail message subtype: cleaned model and views.
bzr revid: tde@openerp.com-20120919110035-724052iqfkkafm73
This commit is contained in:
parent
7f9b4d6d8d
commit
9ec025be0e
|
@ -12,7 +12,7 @@
|
|||
<field eval="'process_email_queue'" name="function"/>
|
||||
<field eval="'()'" name="args"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="mail_subtype_comment" model="mail.message.subtype">
|
||||
<field name="name">comment</field>
|
||||
</record>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>)
|
||||
# Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
|
@ -22,15 +22,23 @@
|
|||
from osv import osv
|
||||
from osv import fields
|
||||
|
||||
|
||||
class mail_message_subtype(osv.osv):
|
||||
|
||||
""" Class holding subtype definition for messages. Subtypes allow to tune
|
||||
the follower subscription, allowing only some subtypes to be pushed
|
||||
on the Wall. """
|
||||
_name = 'mail.message.subtype'
|
||||
_description = 'mail_message_subtype'
|
||||
_columns = {
|
||||
'name': fields.char('Message Subtype ', size = 128,
|
||||
required = True, help = 'Message subtype, gives a more precise type on the message, especially for system notifications. For example, it can be a notification related to a new record (New), or to a stage change in a process (Stage change). Message subtypes allow to precisely tune the notifications the user want to receive on its wall.'),
|
||||
'res_model': fields.char('Model',size = 128, help = "link subtype to model"),
|
||||
'default': fields.boolean('Default', help = "When subscribing to the document, users will receive by default messages related to this subtype unless they uncheck this subtype"),
|
||||
'name': fields.char('Message Subtype ', required=True,
|
||||
help='Message subtype, gives a more precise type on the message, '\
|
||||
'especially for system notifications. For example, it can be '\
|
||||
'a notification related to a new record (New), or to a stage '\
|
||||
'change in a process (Stage change). Message subtypes allow to '\
|
||||
'precisely tune the notifications the user want to receive on its wall.'),
|
||||
'res_model': fields.char('Model', help="link subtype to model"),
|
||||
'default': fields.boolean('Default',
|
||||
help="When subscribing to the document, this subtype will be checked by default."),
|
||||
}
|
||||
_defaults = {
|
||||
'default': True,
|
||||
|
|
|
@ -2,19 +2,14 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--
|
||||
SUBTYPES
|
||||
!-->
|
||||
|
||||
<record model="ir.ui.view" id="view_message_subtype_tree">
|
||||
<field name="name">mail.message.subtype.tree</field>
|
||||
<field name="model">mail.message.subtype</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="priority">10</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Subtype">
|
||||
<field name="name"/>
|
||||
<field name="res_model" invisible="1"/>
|
||||
<field name="res_model"/>
|
||||
<field name="default"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -23,42 +18,27 @@
|
|||
<record model="ir.ui.view" id="view_mail_message_subtype_form">
|
||||
<field name="name">mail.message.subtype.form</field>
|
||||
<field name="model">mail.message.subtype</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Email message" version="7.0">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="res_model"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="default"/>
|
||||
</group>
|
||||
<field name="name"/>
|
||||
<field name="res_model"/>
|
||||
<field name="default"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_message_subtype" model="ir.actions.act_window">
|
||||
<record model="ir.actions.act_window" id="action_view_message_subtype">
|
||||
<field name="name">Subtypes</field>
|
||||
<field name="res_model">mail.message.subtype</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to create a message subtype.
|
||||
</p><p>
|
||||
OpenERP's message subtype allows to ease and fasten the
|
||||
subtype which helps to decrease over crowdy wall comments which displays
|
||||
only those.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem name="Subtypes" id="menu_message_subtype" parent="base.menu_email"
|
||||
action="action_view_message_subtype"/>
|
||||
<menuitem name="Subtypes" id="menu_message_subtype" parent="base.menu_email" action="action_view_message_subtype"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue