1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem id="menu_base_action_rule" name="Action Rule" parent="base.menu_base_config" sequence="0"/>
9 <record id="view_base_action_rule_form" model="ir.ui.view">
10 <field name="name">base.action.rule.form</field>
11 <field name="model">base.action.rule</field>
12 <field name="type">form</field>
13 <field name="arch" type="xml">
14 <form string="Action Rule">
16 <field name="active"/>
17 <field name="max_level" />
18 <separator colspan="4" string="Rule lines"/>
19 <field name="rule_lines" colspan="4" nolabel="1"/>
24 <record id="view_base_action_rule_tree" model="ir.ui.view">
25 <field name="name">base.action.rule.tree</field>
26 <field name="model">base.action.rule</field>
27 <field name="type">tree</field>
28 <field name="arch" type="xml">
29 <tree string="Action Rule">
31 <field name="max_level"/>
36 <record id="base_action_rule_act" model="ir.actions.act_window">
37 <field name="name">Action Rules</field>
38 <field name="res_model">base.action.rule</field>
39 <field name="view_type">form</field>
40 <field name="view_mode">tree,form</field>
41 <field name="view_id" ref="view_base_action_rule_tree"/>
43 <menuitem id="menu_base_action_rule_form" parent="menu_base_action_rule" action="base_action_rule_act"/>
48 <record id="view_base_action_rule_line_form" model="ir.ui.view">
49 <field name="name">base.action.rule.line.form</field>
50 <field name="model">base.action.rule.line</field>
51 <field name="type">form</field>
52 <field name="arch" type="xml">
53 <form string="Action Rule Line">
54 <field name="name" select="1"/>
55 <field name="active" select="2"/>
56 <notebook colspan="4">
57 <page string="Conditions">
58 <separator colspan="4" string="Conditions on Model Fields"/>
59 <field name="regex_name" string="Regex on Model Name" colspan="2"/>
60 <field name="trg_user_id" select="2"/>
61 <separator colspan="4" string="Conditions on Model Partner"/>
62 <field name="trg_partner_id"/>
63 <field name="trg_partner_categ_id"/>
64 <separator colspan="4" string="Conditions on States"/>
65 <field name="trg_state_from" select="2"/>
66 <field name="trg_state_to" select="2"/>
67 <separator colspan="4" string="Conditions on Priority Range"/>
68 <field name="trg_priority_from"/>
69 <field name="trg_priority_to"/>
70 <separator colspan="4" string="Conditions on Timing"/>
71 <field name="trg_date_type"/>
72 <label align="1.0" string="Delay After Trigger Date:"/>
73 <group col="2" colspan="1">
74 <field name="trg_date_range" nolabel="1"/>
75 <field name="trg_date_range_type" nolabel="1"/>
77 <separator colspan="4" string="Note"/>
78 <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"/>
80 <page string="Actions">
81 <separator colspan="4" string="Fields to Change"/>
82 <field name="act_user_id"/>
83 <field name="act_state"/>
84 <field name="act_priority"/>
85 <separator colspan="4" string="E-Mail Reminders (includes the content of the object)"/>
86 <field name="act_remind_partner"/>
87 <field name="act_remind_attach"/>
88 <field name="act_remind_user"/>
89 <group col="2" colspan="2" attrs="{'invisible': [('act_remind_user','=',False)]}">
90 <field name="act_reply_to" attrs="{'required':[('act_remind_user','=',True)]}"/>
92 <field colspan="4" name="act_email_cc"/>
93 <separator colspan="4" string="Server Action to be Triggered"/>
94 <field name="server_action_id"/>
96 <page string="E-Mail Actions">
97 <separator colspan="4" string="Template of Email to Send"/>
98 <field name="act_mail_to_user"/>
99 <field name="act_mail_to_watchers"/>
100 <field colspan="4" name="act_mail_to_email"/>
101 <field colspan="4" name="act_mail_body" attrs="{'required':[('act_remind_user','=',True)]}"/>
102 <separator colspan="4" string="Special Keywords to Be Used in The Body"/>
103 <label align="0.0" string="%%(object_id)s = Object ID" colspan="2"/>
104 <label align="0.0" string="%%(object_subject)s = Object subject" colspan="2"/>
105 <label align="0.0" string="%%(object_description)s = Object description" colspan="2"/>
106 <label align="0.0" string="%%(object_date)s = Creation date" colspan="2"/>
107 <label align="0.0" string="%%(partner)s = Partner name" colspan="2"/>
108 <label align="0.0" string="%%(partner_email)s = Partner email" colspan="2"/>
109 <label align="0.0" string="%%(object_user)s = Responsible name" colspan="2"/>
110 <label align="0.0" string="%%(object_user_email)s = Responsible email" colspan="2"/>
111 <label align="0.0" string="%%(object_user_phone)s = Responsible phone" colspan="2"/>
112 <label align="0.0" string="%% = The '%%' Character" colspan="2"/>
118 <record id="view_base_action_rule_line_tree" model="ir.ui.view">
119 <field name="name">base.action.rule.line.tree</field>
120 <field name="model">base.action.rule.line</field>
121 <field name="type">tree</field>
122 <field name="arch" type="xml">
123 <tree string="Action Rule Lines">
125 <field name="active"/>