odoo/addons/base_action_rule/base_action_rule_view.xml

115 lines
5.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="base.menu_base_action_rule_admin" name="Automated Actions"
parent="base.menu_custom" />
<!--
Action Rule Form View
-->
<record id="view_base_action_rule_form" model="ir.ui.view">
<field name="name">base.action.rule.form</field>
<field name="model">base.action.rule</field>
<field name="arch" type="xml">
<form string="Action Rule" version="7.0">
<sheet>
<group col="4">
<field name="name"/>
<field name="model_id"/>
<field name="filter_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
<field name="sequence"/>
<field name="active"/>
<field name="model" invisible="1"/>
</group>
<notebook>
<page string="Conditions">
<group>
<group name="model" string="Conditions on Model Fields">
<field name="regex_name"/>
<field name="trg_user_id"/>
</group>
<group name="partner" string="Conditions on Model Partner">
<field name="trg_partner_id"/>
<field name="trg_partner_categ_id"/>
</group>
<group name="state" string="Conditions on Status">
<field name="trg_state_from"/>
<field name="trg_state_to"/>
</group>
<group name="timing" string="Conditions on Timing">
<field name="trg_date_type"/>
<field name="trg_date_range" string="Delay After Trigger Date" attrs="{'invisible': [('trg_date_type', '=', 'none')]}"/>
<field name="trg_date_range_type" attrs="{'invisible': [('trg_date_type', '=', 'none')]}"/>
</group>
</group>
<group string="Note">
<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." />
</group>
</page>
<page string="Actions">
<group name="action_followers">
<field name="act_followers" widget="many2many_tags"/>
</group>
<group name="action_field" col="4" string="Fields to Change">
<field name="act_user_id"/>
<field name="act_state"/>
</group>
<group name="action_server" string="Server Actions to be Triggered (eg. Email Reminder, Call Object Method, etc...)" >
<field name="server_action_ids" domain="[('model_id','=', model_id)]" nolabel="1" context="{'default_model_id': model_id}">
<tree string="Server Actions">
<field name="sequence"/>
<field name="name"/>
<field name="state"/>
</tree>
</field>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- Action Rule Tree View -->
<record id="view_base_action_rule_tree" model="ir.ui.view">
<field name="name">base.action.rule.tree</field>
<field name="model">base.action.rule</field>
<field name="arch" type="xml">
<tree string="Action Rule">
<field name="sequence"/>
<field name="name" colspan="4"/>
<field name="filter_id"/>
</tree>
</field>
</record>
<!-- Action Rule Action -->
<record id="base_action_rule_act" model="ir.actions.act_window">
<field name="name">Automated Actions</field>
<field name="res_model">base.action.rule</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_base_action_rule_tree"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to setup a new automated action rule.
</p><p>
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.
</p>
</field>
</record>
<menuitem id="menu_base_action_rule_form"
parent="base.menu_base_action_rule_admin" action="base_action_rule_act" sequence="1"/>
</data>
</openerp>