[IMP] General review and cleaning of all views. Not finished. Worked on exted_groups...
[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="max_level" />
20                     <separator colspan="4" string="Rule lines"/>
21                     <field name="rule_lines" colspan="4" nolabel="1"/>
22                 </form>
23             </field>
24            </record>
25
26 <!-- Action Rule Tree View -->
27
28            <record id="view_base_action_rule_tree" model="ir.ui.view">
29                <field name="name">base.action.rule.tree</field>
30             <field name="model">base.action.rule</field>
31             <field name="type">tree</field>
32             <field name="arch" type="xml">
33                 <tree string="Action Rule">
34                     <field name="name" colspan="4"/>
35                     <field name="max_level"/>
36                     <field name="rule_lines" colspan="4" nolabel="1"/>
37                 </tree>
38             </field>
39            </record>
40
41 <!-- Action Rule Action -->
42
43            <record id="base_action_rule_act" model="ir.actions.act_window">
44             <field name="name">Action Rules</field>
45             <field name="res_model">base.action.rule</field>
46             <field name="view_type">form</field>
47             <field name="view_mode">tree,form</field>
48             <field name="view_id" ref="view_base_action_rule_tree"/>
49         </record>
50
51            <menuitem id="menu_base_action_rule_form"
52                parent="menu_base_action_rule" action="base_action_rule_act" />
53
54            <!--
55             Action Rule Lines Form View
56         -->
57         <record id="view_base_action_rule_line_form" model="ir.ui.view">
58             <field name="name">base.action.rule.line.form</field>
59             <field name="model">base.action.rule.line</field>
60             <field name="type">form</field>
61             <field name="arch" type="xml">
62                 <form string="Action Rule Line">
63                     <field name="name" select="1"/>
64                     <field name="active"/>
65                     <notebook colspan="4">
66                         <page string="Conditions">
67                             <group col="2" colspan="2" name="model">
68                                 <separator colspan="4" string="Conditions on Model Fields"/>
69                                 <field name="regex_name" string="Regex on Model Name" colspan="2"/>
70                                 <field name="trg_user_id"/>
71                             </group>
72                             <group col="2" colspan="2" name="partner">
73                                 <separator colspan="4" string="Conditions on Model Partner"/>
74                                 <field name="trg_partner_id"/>
75                                 <field name="trg_partner_categ_id"/>
76                             </group>
77                             <group col="2" colspan="2">
78                                 <separator colspan="4" string="Conditions on States"/>
79                                 <field name="trg_state_from"/>
80                                 <field name="trg_state_to"/>
81                             </group>
82                             <group col="2" colspan="2">
83                                 <separator colspan="4" string="Conditions on Priority Range"/>
84                                 <field name="trg_priority_from"/>
85                                 <field name="trg_priority_to"/>
86                             </group>
87                             <group col="2" colspan="2">
88                                 <separator colspan="4" string="Conditions on Timing"/>
89                                 <field name="trg_date_type"/>
90                                 <label align="1.0" string="Delay After Trigger Date:"/>
91                                 <group col="2" colspan="1">
92                                     <field name="trg_date_range" nolabel="1"/>
93                                     <field name="trg_date_range_type" nolabel="1"/>
94                                 </group>
95                             </group>
96                             <separator colspan="4" string="Note"/>
97                             <label align="0.0"  string="The rule use a AND operator. The model must match all non empty fields so that the rule execute the action described in the 'Actions' tab." colspan="4"/>
98                         </page>
99                         <page string="Actions">
100                             <separator colspan="4" string="Fields to Change"/>
101                             <field name="act_user_id"/>
102                             <field name="act_state"/>
103                             <field name="act_priority"/>
104                             <separator colspan="4" string="E-Mail Reminders (includes the content of the object)"/>
105                             <field name="act_remind_partner"/>
106                             <field name="act_remind_attach"/>
107                             <field name="act_remind_user"/>
108                             <group col="2" colspan="2" attrs="{'invisible': [('act_remind_user','=',False)]}">
109                                 <field name="act_reply_to" attrs="{'required':[('act_remind_user','=',True)]}"/>
110                             </group>
111                             <field colspan="4" name="act_email_cc"/>
112                             <separator colspan="4" string="Server Action to be Triggered"/>
113                             <field name="server_action_id"/>
114                         </page>
115                         <page string="E-Mail Actions">
116                             <separator colspan="4" string="Template of Email to Send"/>
117                             <field name="act_mail_to_user"/>
118                             <field name="act_mail_to_watchers"/>
119                             <field colspan="4" name="act_mail_to_email"/>
120                             <field colspan="4" name="act_mail_body" attrs="{'required':[('act_remind_user','=',True)]}"/>
121                             <separator colspan="4" string="Special Keywords to Be Used in The Body"/>
122                             <label align="0.0" string="%%(object_id)s = Object ID" colspan="2"/>
123                             <label align="0.0" string="%%(object_subject)s = Object subject" colspan="2"/>
124                             <label align="0.0" string="%%(object_description)s = Object description" colspan="2"/>
125                             <label align="0.0" string="%%(object_date)s = Creation date" colspan="2"/>
126                             <label align="0.0" string="%%(partner)s = Partner name" colspan="2"/>
127                             <label align="0.0" string="%%(partner_email)s = Partner email" colspan="2"/>
128                             <label align="0.0" string="%%(object_user)s = Responsible name" colspan="2"/>
129                             <label align="0.0" string="%%(object_user_email)s = Responsible email" colspan="2"/>
130                             <label align="0.0" string="%%(object_user_phone)s = Responsible phone" colspan="2"/>
131                             <label align="0.0" string="%% = The &apos;%%&apos; Character" colspan="2"/>
132                         </page>
133                     </notebook>
134                 </form>
135             </field>
136         </record>
137
138 <!-- Action Rule Lines Tree View -->
139
140         <record id="view_base_action_rule_line_tree" model="ir.ui.view">
141             <field name="name">base.action.rule.line.tree</field>
142             <field name="model">base.action.rule.line</field>
143             <field name="type">tree</field>
144             <field name="arch" type="xml">
145                 <tree string="Action Rule Lines">
146                     <field name="name"/>
147                     <field name="active"/>
148                 </tree>
149             </field>
150         </record>
151
152         <act_window
153             domain="[('rule_id', '=', active_id)]"
154             id="act_rule_lines_open"
155             name="Open Rule Lines"
156             context="{'rule_id': active_id}"
157             res_model="base.action.rule.line"
158             src_model="base.action.rule"/>
159
160     </data>
161 </openerp>