[MOD] crm_*: usability improvement in access rights
[odoo/odoo.git] / addons / base_action_rule / base_action_rule_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <menuitem id="base.menu_base_action_rule" name="Automated Actions"
5             groups="base.group_extended,base.group_system"
6             parent="base.menu_base_config" sequence="3" />
7
8         <!--
9             Action Rule Form View
10         -->
11            <record id="view_base_action_rule_form" model="ir.ui.view">
12                <field name="name">base.action.rule.form</field>
13             <field name="model">base.action.rule</field>
14             <field name="type">form</field>
15             <field name="arch" type="xml">
16                 <form string="Action Rule">
17                     <field name="name"/>
18                     <field name="model_id" select="1" on_change="onchange_model_id(model_id)"/>
19                     <field name="filter_id" />
20                     <field name="sequence"/>
21                     <field name="active"/>
22                     <notebook colspan="4">
23                         <page string="Conditions">
24                             <group col="2" colspan="2" name="model">
25                                 <separator colspan="4" string="Conditions on Model Fields"/>
26                                 <field name="regex_name" colspan="2"/>
27                                 <field name="trg_user_id"/>
28                             </group>
29                             <group col="2" colspan="2" name="partner">
30                                 <separator colspan="4" string="Conditions on Model Partner"/>
31                                 <field name="trg_partner_id"/>
32                                 <field name="trg_partner_categ_id"/>
33                             </group>
34                             <group col="2" colspan="2">
35                                 <separator colspan="4" string="Conditions on States"/>
36                                 <field name="trg_state_from"/>
37                                 <field name="trg_state_to"/>
38                             </group>
39                             <group col="2" colspan="2">
40                                 <separator colspan="4" string="Conditions on Timing"/>
41                                 <field name="trg_date_type"/>
42                                 <group col="3" colspan="2" attrs="{'invisible': [('trg_date_type', '=', 'none')]}">
43                                     <field name="trg_date_range" string="Delay After Trigger Date"/>
44                                     <field name="trg_date_range_type" nolabel="1"/>
45                                     </group>
46                             </group>
47                             <separator colspan="4" string="Note"/>
48                             <label align="0.0" colspan="4" width="900"
49                                 string="The rule uses the AND operator. The model must match all non-empty fields so that the rule executes the action described in the 'Actions' tab." />
50                         </page>
51                         <page string="Actions">
52                             <separator colspan="4" string="Fields to Change"/>
53                             <field name="act_user_id"/>
54                             <field name="act_state"/>
55                             <separator colspan="4" string="Server Action to be Triggered"/>
56                             <field name="server_action_id"/>
57                         </page>
58                         <page string="Email Actions">
59                                 <separator colspan="4" string="Email Reminders"/>
60                                 <field name="act_remind_partner"/>
61                                 <field name="act_remind_attach"/>
62                                 <field name="act_remind_user"/>
63                                 <group col="2" colspan="2" attrs="{'invisible': [('act_remind_user','=',False)]}">
64                                     <field name="act_reply_to" attrs="{'required':[('act_remind_user','=',True)]}"/>
65                                 </group>
66                                     <separator colspan="4" string="Email Information"/>
67                                     <field name="act_mail_to_user"/>
68                                     <field colspan="4" name="act_mail_to_email"/>
69                                     <field name="act_mail_to_watchers"/>
70                                     <field colspan="4" name="act_email_cc"/>
71                             <separator colspan="4" string="Email Body"/>
72                             <field colspan="4" name="act_mail_body" height="250"
73                                 nolabel="1" attrs="{'required':[('act_remind_user','=',True)]}" />
74                             <separator colspan="4" string="Special Keywords to Be Used in The Body"/>
75                             <label align="0.0" string="%%(object_id)s = Object ID" colspan="2"/>
76                             <label align="0.0" string="%%(object_subject)s = Object subject" colspan="2"/>
77                             <label align="0.0" string="%%(object_description)s = Object description" colspan="2"/>
78                             <label align="0.0" string="%%(object_date)s = Creation date" colspan="2"/>
79                             <label align="0.0" string="%%(partner)s = Partner name" colspan="2"/>
80                             <label align="0.0" string="%%(partner_email)s = Partner Email" colspan="2"/>
81                             <label align="0.0" string="%%(object_user)s = Responsible name" colspan="2"/>
82                             <label align="0.0" string="%%(object_user_email)s = Responsible Email" colspan="2"/>
83                             <label align="0.0" string="%%(object_user_phone)s = Responsible phone" colspan="2"/>
84                         </page>
85                     </notebook>
86                 </form>
87             </field>
88            </record>
89
90 <!-- Action Rule Tree View -->
91
92            <record id="view_base_action_rule_tree" model="ir.ui.view">
93                <field name="name">base.action.rule.tree</field>
94             <field name="model">base.action.rule</field>
95             <field name="type">tree</field>
96             <field name="arch" type="xml">
97                 <tree string="Action Rule">
98                     <field name="sequence"/>
99                     <field name="name" colspan="4"/>
100                     <field name="filter_id"/>
101                 </tree>
102             </field>
103            </record>
104
105 <!-- Action Rule Action -->
106
107            <record id="base_action_rule_act" model="ir.actions.act_window">
108             <field name="name">Automated Actions</field>
109             <field name="res_model">base.action.rule</field>
110             <field name="view_type">form</field>
111             <field name="view_mode">tree,form</field>
112             <field name="view_id" ref="view_base_action_rule_tree"/>
113         </record>
114
115            <menuitem id="menu_base_action_rule_form"
116                parent="base.menu_base_action_rule" action="base_action_rule_act" sequence="1"/>
117
118
119     </data>
120 </openerp>