[IMP] website_mail: make the template / mail editor work. We now have a limited
[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                                     <field name="trg_date_calendar_id" class="oe_inline"
47                                         attrs="{'invisible': ['|', ('trg_date_id','=',False), ('trg_date_range_type', '!=', 'day')]}"/>
48                                 </group>
49                                 <p>
50                                     Select when the action must be run, and add filters and/or timing conditions.
51                                     <br/>
52                                     In order to create a new filter:
53                                     <ul>
54                                         <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>
55                                         <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>
56                                     </ul>
57                                     The filter must therefore be available in this page.
58                                 </p>
59                             </page>
60                             <page string="Actions">
61                                 <group name="action_field" col="4" string="Fields to Change">
62                                     <field name="act_user_id"/>
63                                     <field name="act_followers" widget="many2many_tags"/>
64                                 </group>
65                                 <group name="action_server" string="Server actions to run">
66                                     <field name="server_action_ids" domain="[('model_id','=', model_id)]" nolabel="1" context="{'default_model_id': model_id}">
67                                         <tree string="Server Actions">
68                                             <field name="sequence"/>
69                                             <field name="name"/>
70                                             <field name="state"/>
71                                         </tree>
72                                     </field>
73                                 </group>
74                            </page>
75                        </notebook>
76                     </sheet>
77                 </form>
78             </field>
79         </record>
80
81         <!-- Action Rule Tree View -->
82         <record id="view_base_action_rule_tree" model="ir.ui.view">
83             <field name="name">base.action.rule.tree</field>
84             <field name="model">base.action.rule</field>
85             <field name="arch" type="xml">
86                 <tree string="Action Rule">
87                     <field name="sequence"/>
88                     <field name="name"/>
89                     <field name="kind"/>
90                     <field name="filter_id"/>
91                 </tree>
92             </field>
93         </record>
94
95         <!-- Action Rule Action -->
96         <record id="base_action_rule_act" model="ir.actions.act_window">
97             <field name="name">Automated Actions</field>
98             <field name="res_model">base.action.rule</field>
99             <field name="view_type">form</field>
100             <field name="view_mode">tree,form</field>
101             <field name="view_id" ref="view_base_action_rule_tree"/>
102             <field name="help" type="html">
103               <p class="oe_view_nocontent_create">
104                 Click to setup a new automated action rule. 
105               </p><p>
106                 Use automated actions to automatically trigger actions for
107                 various screens. Example: a lead created by a specific user may
108                 be automatically set to a specific sales team, or an
109                 opportunity which still has status pending after 14 days might
110                 trigger an automatic reminder email.
111               </p>
112             </field>
113         </record>
114
115         <menuitem id="menu_base_action_rule_form"
116             parent="base.menu_base_action_rule_admin" action="base_action_rule_act" sequence="1"/>
117
118     </data>
119 </openerp>