[IMP] base_action_rule: form view improvement

bzr revid: rco@openerp.com-20121221144934-erkp8md6kq14070a
This commit is contained in:
Raphael Collet 2012-12-21 15:49:34 +01:00
parent 1eea63fc92
commit 1671b9e03a
2 changed files with 31 additions and 31 deletions

View File

@ -69,8 +69,8 @@ class base_action_rule(osv.osv):
"trigger date, like sending a reminder 15 minutes before a meeting."),
'trg_date_range_type': fields.selection([('minutes', 'Minutes'), ('hour', 'Hours'),
('day', 'Days'), ('month', 'Months')], 'Delay type'),
'act_user_id': fields.many2one('res.users', 'Set Responsible to'),
'act_followers': fields.many2many("res.partner", string="Set Followers"),
'act_user_id': fields.many2one('res.users', 'Set Responsible'),
'act_followers': fields.many2many("res.partner", string="Add Followers"),
'server_action_ids': fields.many2many('ir.actions.server', string='Server Actions',
domain="[('model_id', '=', model_id)]",
help="Examples: email reminders, call object service, etc."),

View File

@ -4,31 +4,27 @@
<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>
<!-- 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="active"/>
<field name="model_id"/>
<field name="model" invisible="1"/>
<field name="sequence" invisible="1"/>
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<group>
<group>
<field name="model_id"/>
<field name="model" invisible="1"/>
</group>
<group>
<field name="active"/>
<field name="sequence"/>
</group>
</group>
<notebook>
<page string="Conditions">
<p class="oe_grey">
<b>Select a filter or a timer as condition.</b><br/> An action rule is checked when you create or modify the "Related Document Model". The precondition filter is checked right before the modification while the postcondition filter is checked after the modification. A precondition filter will therefore not work during a creation.<br/>
<b>To create a new filter:</b><br/>
- Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)<br/>
- In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"<br/>
The filter must therefore be available in this page.
</p>
<group>
<group name="filter" string="Filter Condition">
<field name="filter_pre_id" domain="[('model_id','=',model), ('user_id', '=', False)]" context="{'default_model_id': model}"/>
@ -43,13 +39,20 @@
</div>
</group>
</group>
<p class="oe_grey">
<b>Select a filter or a timer as condition.</b><br/> An action rule is checked when you create or modify the "Related Document Model". The precondition filter is checked right before the modification while the postcondition filter is checked after the modification. A precondition filter will therefore not work during a creation.<br/>
<b>To create a new filter:</b><br/>
- Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)<br/>
- In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"<br/>
The filter must therefore be available in this page.
</p>
</page>
<page string="Actions">
<group name="action_field" col="4" string="Fields to Change">
<field name="act_user_id"/>
<field name="act_followers" widget="many2many_tags"/>
</group>
<group name="action_server" string="Server Actions to be Triggered (eg. Email Reminder, Call Object Method, etc...)" >
<group name="action_server" string="Server actions to run">
<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"/>
@ -63,24 +66,22 @@
</sheet>
</form>
</field>
</record>
</record>
<!-- Action Rule Tree View -->
<record id="view_base_action_rule_tree" model="ir.ui.view">
<field name="name">base.action.rule.tree</field>
<!-- 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="name"/>
<field name="filter_id"/>
</tree>
</field>
</record>
<!-- Action Rule Action -->
</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>
@ -103,6 +104,5 @@
<menuitem id="menu_base_action_rule_form"
parent="base.menu_base_action_rule_admin" action="base_action_rule_act" sequence="1"/>
</data>
</openerp>