1 <?xml version="1.0" encoding="utf-8"?>
4 <menuitem id="base.menu_base_action_rule" name="Automated Actions"
5 groups="base.group_extended"
6 parent="base.menu_base_config" sequence="20" />
7 <menuitem id="base.menu_base_action_rule_admin" name="Automated Actions"
8 groups="base.group_extended"
9 parent="base.menu_custom" />
14 <record id="view_base_action_rule_form" model="ir.ui.view">
15 <field name="name">base.action.rule.form</field>
16 <field name="model">base.action.rule</field>
17 <field name="type">form</field>
18 <field name="arch" type="xml">
19 <form string="Action Rule">
20 <group col="6" colspan="4">
22 <field name="model_id" select="1" on_change="onchange_model_id(model_id)"/>
23 <field name="filter_id" />
24 <field name="sequence"/>
25 <field name="active"/>
27 <notebook colspan="4">
28 <page string="Conditions">
29 <group col="2" colspan="2" name="model">
30 <separator colspan="4" string="Conditions on Model Fields"/>
31 <field name="regex_name" colspan="2"/>
32 <field name="trg_user_id"/>
34 <group col="2" colspan="2" name="partner">
35 <separator colspan="4" string="Conditions on Model Partner"/>
36 <field name="trg_partner_id"/>
37 <field name="trg_partner_categ_id"/>
39 <group col="2" colspan="2">
40 <separator colspan="4" string="Conditions on States"/>
41 <field name="trg_state_from"/>
42 <field name="trg_state_to"/>
44 <group col="2" colspan="2">
45 <separator colspan="4" string="Conditions on Timing"/>
46 <field name="trg_date_type"/>
47 <group col="3" colspan="2" attrs="{'invisible': [('trg_date_type', '=', 'none')]}">
48 <field name="trg_date_range" string="Delay After Trigger Date"/>
49 <field name="trg_date_range_type" nolabel="1"/>
52 <separator colspan="4" string="Note"/>
53 <label align="0.0" colspan="4" width="900"
54 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." />
56 <page string="Actions">
57 <separator colspan="4" string="Fields to Change"/>
58 <field name="act_user_id"/>
59 <field name="act_state"/>
60 <separator colspan="4" string="Server Action to be Triggered"/>
61 <field name="server_action_id"/>
63 <page string="Email Actions">
64 <separator colspan="4" string="Email Reminders"/>
65 <field name="act_remind_partner"/>
66 <field name="act_remind_attach"/>
67 <field name="act_remind_user"/>
68 <group col="2" colspan="2" attrs="{'invisible': [('act_remind_user','=',False)]}">
69 <field name="act_reply_to" attrs="{'required':[('act_remind_user','=',True)]}"/>
71 <separator colspan="4" string="Email Information"/>
72 <field name="act_email_from" />
73 <field name="act_email_to" />
74 <field name="act_mail_to_user"/>
75 <field colspan="4" name="act_mail_to_email"/>
76 <field name="act_mail_to_watchers"/>
77 <field colspan="4" name="act_email_cc"/>
78 <separator colspan="4" string="Email Body"/>
79 <field colspan="4" name="act_mail_body" height="250"
80 nolabel="1" attrs="{'required':[('act_remind_user','=',True)]}" />
81 <separator colspan="4" string="Special Keywords to Be Used in The Body"/>
82 <label align="0.0" string="%%(object_id)s = Object ID" colspan="2"/>
83 <label align="0.0" string="%%(object_subject)s = Object subject" colspan="2"/>
84 <label align="0.0" string="%%(object_description)s = Object description" colspan="2"/>
85 <label align="0.0" string="%%(object_date)s = Creation date" colspan="2"/>
86 <label align="0.0" string="%%(partner)s = Partner name" colspan="2"/>
87 <label align="0.0" string="%%(partner_email)s = Partner Email" colspan="2"/>
88 <label align="0.0" string="%%(object_user)s = Responsible name" colspan="2"/>
89 <label align="0.0" string="%%(object_user_email)s = Responsible Email" colspan="2"/>
90 <label align="0.0" string="%%(object_user_phone)s = Responsible phone" colspan="2"/>
97 <!-- Action Rule Tree View -->
99 <record id="view_base_action_rule_tree" model="ir.ui.view">
100 <field name="name">base.action.rule.tree</field>
101 <field name="model">base.action.rule</field>
102 <field name="type">tree</field>
103 <field name="arch" type="xml">
104 <tree string="Action Rule">
105 <field name="sequence"/>
106 <field name="name" colspan="4"/>
107 <field name="filter_id"/>
112 <!-- Action Rule Action -->
114 <record id="base_action_rule_act" model="ir.actions.act_window">
115 <field name="name">Automated Actions</field>
116 <field name="res_model">base.action.rule</field>
117 <field name="view_type">form</field>
118 <field name="view_mode">tree,form</field>
119 <field name="view_id" ref="view_base_action_rule_tree"/>
120 <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>
123 <menuitem id="menu_base_action_rule_form"
124 parent="base.menu_base_action_rule_admin" action="base_action_rule_act" sequence="1"/>