[MERGE] Merged demo homepage improvements
[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_admin" name="Automated Actions"
5             parent="base.menu_custom" />
6
7         <!-- Action Rule Form View -->
8         <record id="view_base_action_rule_form" model="ir.ui.view">
9             <field name="name">base.action.rule.form</field>
10             <field name="model">base.action.rule</field>
11             <field name="arch" type="xml">
12                 <form string="Action Rule" version="7.0">
13                     <sheet>
14                         <label for="name" class="oe_edit_only"/>
15                         <h1><field name="name"/></h1>
16                         <group>
17                             <group>
18                                 <field name="model_id" on_change="onchange_model_id(model_id, context)"/>
19                                 <field name="model" invisible="1"/>
20                             </group>
21                             <group>
22                                 <field name="active"/>
23                                 <field name="sequence"/>
24                             </group>
25                         </group>
26                         <notebook>
27                             <page string="Conditions">
28                                 <group>
29                                     <field name="kind" required="1"
30                                         on_change="onchange_kind(kind)"/>
31                                     <field name="filter_pre_id"
32                                         domain="[('model_id','=',model), ('user_id', '=', False)]"
33                                         context="{'default_model_id': model}"
34                                         attrs="{'invisible': [('kind', '!=', 'on_write')]}"/>
35                                     <field name="filter_id"
36                                         domain="[('model_id','=',model), ('user_id', '=', False)]"
37                                         context="{'default_model_id': model}"/>
38                                     <field name="trg_date_id"
39                                         attrs="{'invisible': [('kind', '!=', 'on_time')], 'required': [('kind', '=', 'on_time')]}"/>
40                                     <label for="trg_date_range" string="Delay After Trigger Date"
41                                         attrs="{'invisible': [('trg_date_id','=',False)]}"/>
42                                     <div attrs="{'invisible': [('trg_date_id','=',False)]}">
43                                         <field name="trg_date_range" class="oe_inline"/>
44                                         <field name="trg_date_range_type" class="oe_inline" attrs="{'required': [('trg_date_id','!=',False)]}"/>
45                                     </div>
46                                 </group>
47                                 <p>
48                                     Select when the action must be run, and add filters and/or timing conditions.
49                                     <br/>
50                                     In order to create a new filter:
51                                     <ul>
52                                         <li>Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)</li>
53                                         <li>In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"</li>
54                                     </ul>
55                                     The filter must therefore be available in this page.
56                                 </p>
57                             </page>
58                             <page string="Actions">
59                                 <group name="action_field" col="4" string="Fields to Change">
60                                     <field name="act_user_id"/>
61                                     <field name="act_followers" widget="many2many_tags"/>
62                                 </group>
63                                 <group name="action_server" string="Server actions to run">
64                                     <field name="server_action_ids" domain="[('model_id','=', model_id)]" nolabel="1" context="{'default_model_id': model_id}">
65                                         <tree string="Server Actions">
66                                             <field name="sequence"/>
67                                             <field name="name"/>
68                                             <field name="state"/>
69                                         </tree>
70                                     </field>
71                                 </group>
72                            </page>
73                        </notebook>
74                     </sheet>
75                 </form>
76             </field>
77         </record>
78
79         <!-- Action Rule Tree View -->
80         <record id="view_base_action_rule_tree" model="ir.ui.view">
81             <field name="name">base.action.rule.tree</field>
82             <field name="model">base.action.rule</field>
83             <field name="arch" type="xml">
84                 <tree string="Action Rule">
85                     <field name="sequence"/>
86                     <field name="name"/>
87                     <field name="kind"/>
88                     <field name="filter_id"/>
89                 </tree>
90             </field>
91         </record>
92
93         <!-- Action Rule Action -->
94         <record id="base_action_rule_act" model="ir.actions.act_window">
95             <field name="name">Automated Actions</field>
96             <field name="res_model">base.action.rule</field>
97             <field name="view_type">form</field>
98             <field name="view_mode">tree,form</field>
99             <field name="view_id" ref="view_base_action_rule_tree"/>
100             <field name="help" type="html">
101               <p class="oe_view_nocontent_create">
102                 Click to setup a new automated action rule. 
103               </p><p>
104                 Use automated actions to automatically trigger actions for
105                 various screens. Example: a lead created by a specific user may
106                 be automatically set to a specific sales team, or an
107                 opportunity which still has status pending after 14 days might
108                 trigger an automatic reminder email.
109               </p>
110             </field>
111         </record>
112
113         <menuitem id="menu_base_action_rule_form"
114             parent="base.menu_base_action_rule_admin" action="base_action_rule_act" sequence="1"/>
115
116     </data>
117 </openerp>