[MERGE] branch merged with lp:~openerp-dev/openobject-addons/trunk-dev-addons3
[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="menu_base_action_rule" name="Action Rule"
5             groups="base.group_extended"
6             parent="base.menu_base_config" sequence="0" />
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" select="1"/>
18                     <field name="active"/>
19                     <field name="sequence"/>
20                     <field name="max_level" />
21                     <field name="domain"/>
22                     <field name="filter_id"/>
23                     <notebook colspan="4">
24                         <page string="Conditions">
25                             <group col="2" colspan="2" name="model">
26                                 <separator colspan="4" string="Conditions on Model Fields"/>
27                                 <field name="regex_name" colspan="2"/>
28                                 <field name="trg_user_id"/>
29                             </group>
30                             <group col="2" colspan="2" name="partner">
31                                 <separator colspan="4" string="Conditions on Model Partner"/>
32                                 <field name="trg_partner_id"/>
33                                 <field name="trg_partner_categ_id"/>
34                             </group>
35                             <group col="2" colspan="2">
36                                 <separator colspan="4" string="Conditions on States"/>
37                                 <field name="trg_state_from"/>
38                                 <field name="trg_state_to"/>
39                             </group>
40                             <group col="2" colspan="2">
41                                 <separator colspan="4" string="Conditions on Timing"/>
42                                 <field name="trg_date_type"/>
43                                 <group col="3" colspan="2" attrs="{'invisible': [('trg_date_type', '=', 'none')]}">
44                                     <field name="trg_date_range" string="Delay After Trigger Date"/>
45                                     <field name="trg_date_range_type" nolabel="1"/>
46                                     </group>
47                             </group>
48                             <separator colspan="4" string="Note"/>
49                             <label align="0.0" colspan="4" width="900"
50                                 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." />
51                         </page>
52                         <page string="Actions">
53                             <separator colspan="4" string="Fields to Change"/>
54                             <field name="act_user_id"/>
55                             <field name="act_state"/>
56                             <separator colspan="4" string="Server Action to be Triggered"/>
57                             <field name="server_action_id"/>
58                         </page>
59                         <page string="Email Actions">
60                                 <separator colspan="4" string="Email Reminders"/>
61                                 <field name="act_remind_partner"/>
62                                 <field name="act_remind_attach"/>
63                                 <field name="act_remind_user"/>
64                                 <group col="2" colspan="2" attrs="{'invisible': [('act_remind_user','=',False)]}">
65                                     <field name="act_reply_to" attrs="{'required':[('act_remind_user','=',True)]}"/>
66                                 </group>
67                                     <separator colspan="4" string="Email Information"/>
68                                     <field name="act_mail_to_user"/>
69                                     <field colspan="4" name="act_mail_to_email"/>
70                                     <field name="act_mail_to_watchers"/>
71                                     <field colspan="4" name="act_email_cc"/>
72                             <separator colspan="4" string="Email Body"/>
73                             <field colspan="4" name="act_mail_body" height="250"
74                                 nolabel="1" attrs="{'required':[('act_remind_user','=',True)]}" />
75                             <separator colspan="4" string="Special Keywords to Be Used in The Body"/>
76                             <label align="0.0" string="%%(object_id)s = Object ID" colspan="2"/>
77                             <label align="0.0" string="%%(object_subject)s = Object subject" colspan="2"/>
78                             <label align="0.0" string="%%(object_description)s = Object description" colspan="2"/>
79                             <label align="0.0" string="%%(object_date)s = Creation date" colspan="2"/>
80                             <label align="0.0" string="%%(partner)s = Partner name" colspan="2"/>
81                             <label align="0.0" string="%%(partner_email)s = Partner Email" colspan="2"/>
82                             <label align="0.0" string="%%(object_user)s = Responsible name" colspan="2"/>
83                             <label align="0.0" string="%%(object_user_email)s = Responsible Email" colspan="2"/>
84                             <label align="0.0" string="%%(object_user_phone)s = Responsible phone" colspan="2"/>
85                         </page>
86                     </notebook>
87                 </form>
88             </field>
89            </record>
90
91 <!-- Action Rule Tree View -->
92
93            <record id="view_base_action_rule_tree" model="ir.ui.view">
94                <field name="name">base.action.rule.tree</field>
95             <field name="model">base.action.rule</field>
96             <field name="type">tree</field>
97             <field name="arch" type="xml">
98                 <tree string="Action Rule">
99                     <field name="name" colspan="4"/>
100                     <field name="sequence"/>
101                     <field name="max_level"/>
102                     <field name="domain"/>
103                 </tree>
104             </field>
105            </record>
106
107 <!-- Action Rule Action -->
108
109            <record id="base_action_rule_act" model="ir.actions.act_window">
110             <field name="name">Action Rules</field>
111             <field name="res_model">base.action.rule</field>
112             <field name="view_type">form</field>
113             <field name="view_mode">tree,form</field>
114             <field name="view_id" ref="view_base_action_rule_tree"/>
115         </record>
116
117            <menuitem id="menu_base_action_rule_form"
118                parent="menu_base_action_rule" action="base_action_rule_act" />
119
120
121     </data>
122 </openerp>