1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem id="base.menu_base_action_rule_admin" name="Automated Actions"
5 parent="base.menu_custom" />
10 <record id="view_base_action_rule_form" model="ir.ui.view">
11 <field name="name">base.action.rule.form</field>
12 <field name="model">base.action.rule</field>
13 <field name="type">form</field>
14 <field name="arch" type="xml">
15 <form string="Action Rule" version="7.0">
19 <field name="model_id" on_change="onchange_model_id(model_id)"/>
20 <field name="filter_id" />
21 <field name="sequence"/>
22 <field name="active"/>
25 <page string="Conditions">
27 <group name="model" string="Conditions on Model Fields">
28 <field name="regex_name"/>
29 <field name="trg_user_id"/>
31 <group name="partner" string="Conditions on Model Partner">
32 <field name="trg_partner_id"/>
33 <field name="trg_partner_categ_id"/>
35 <group string="Conditions on States">
36 <field name="trg_state_from"/>
37 <field name="trg_state_to"/>
39 <group string="Conditions on Timing">
40 <field name="trg_date_type"/>
41 <group attrs="{'invisible': [('trg_date_type', '=', 'none')]}">
42 <field name="trg_date_range" string="Delay After Trigger Date"/>
43 <field name="trg_date_range_type"/>
47 <separator string="Note"/>
48 <label 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." />
50 <page string="Actions">
51 <group string="Fields to Change" col="4">
52 <field name="act_user_id"/>
53 <field name="act_state"/>
55 <group col="2" string="Server Action to be Triggered">
56 <field name="server_action_id"/>
59 <page string="Email Actions">
61 <separator colspan="4" string="Email Reminders"/>
62 <field name="act_remind_partner"/>
63 <field name="act_remind_attach"/>
64 <field name="act_remind_user"/>
65 <group col="2" colspan="2" attrs="{'invisible': [('act_remind_user','=',False)]}">
66 <field name="act_reply_to" attrs="{'required':[('act_remind_user','=',True)]}"/>
68 <separator colspan="4" string="Email Information"/>
69 <field name="act_email_from" />
70 <field name="act_email_to" />
71 <field name="act_mail_to_user"/>
72 <field colspan="4" name="act_mail_to_email"/>
73 <field name="act_mail_to_watchers"/>
74 <field colspan="4" name="act_email_cc"/>
75 <separator colspan="4" string="Email Body"/>
76 <field colspan="4" name="act_mail_body" height="250"
77 nolabel="1" attrs="{'required':[('act_remind_user','=',True)]}" />
78 <separator colspan="4" string="Special Keywords to be Used in the Body"/>
79 <label align="0.0" string="%%(object_id)s = Object ID" colspan="2"/>
80 <label align="0.0" string="%%(object_subject)s = Object subject" colspan="2"/>
81 <label align="0.0" string="%%(object_description)s = Object description" colspan="2"/>
82 <label align="0.0" string="%%(object_date)s = Creation date" colspan="2"/>
83 <label align="0.0" string="%%(partner)s = Partner name" colspan="2"/>
84 <label align="0.0" string="%%(partner_email)s = Partner Email" colspan="2"/>
85 <label align="0.0" string="%%(object_user)s = Responsible name" colspan="2"/>
86 <label align="0.0" string="%%(object_user_email)s = Responsible Email" colspan="2"/>
87 <label align="0.0" string="%%(object_user_phone)s = Responsible phone" colspan="2"/>
96 <!-- Action Rule Tree View -->
98 <record id="view_base_action_rule_tree" model="ir.ui.view">
99 <field name="name">base.action.rule.tree</field>
100 <field name="model">base.action.rule</field>
101 <field name="type">tree</field>
102 <field name="arch" type="xml">
103 <tree string="Action Rule">
104 <field name="sequence"/>
105 <field name="name" colspan="4"/>
106 <field name="filter_id"/>
111 <!-- Action Rule Action -->
113 <record id="base_action_rule_act" model="ir.actions.act_window">
114 <field name="name">Automated Actions</field>
115 <field name="res_model">base.action.rule</field>
116 <field name="view_type">form</field>
117 <field name="view_mode">tree,form</field>
118 <field name="view_id" ref="view_base_action_rule_tree"/>
119 <field name="help">Use automated actions to automatically trigger actions for various screens. Example: a lead created by a specific user may be automatically set to a specific sales team, or an opportunity which still has status pending after 14 days might trigger an automatic reminder email.</field>
122 <menuitem id="menu_base_action_rule_form"
123 parent="base.menu_base_action_rule_admin" action="base_action_rule_act" sequence="1"/>