summaryrefslogtreecommitdiff
path: root/addons/hr_contract/data/hr_contract_data.xml
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2016-12-14 10:38:16 +0100
committerThibault Delavallée <tde@odoo.com>2017-01-03 19:11:06 +0100
commit8fa9f7d6d4bc75bb78547358c3cb1c398b1a52ca (patch)
tree8c75c28520a4e27912e64ba493e60f0d7c329574 /addons/hr_contract/data/hr_contract_data.xml
parent452a97d9d44771d868e5475e3323e1c8964b4740 (diff)
[REF] ir_actions: refactor and simplify ir.actions.server
Main idea of this commit is to simplify the various options of ir.actions.server model. Purpose is to make it a simple tool to execute some actions or python code. This has two main consequences * create and update server actions are simplified to update only the current record. Complex options can always be achieved by python code instead of error-prone option building mechanism; * condition of server actions is removed. If a condition is necessary it can either be included in a code server action, or integrated in an automated action; This commit features : * remove 'client_action' server action type. Indeed this can be achieved with a code server action returning an action; * remove 'condition' on ir_actions_server model. From now on conditions and triggers are managed in server action code or using automated or scheduled action; * clean 'create and copy a record'. Create and link are the proposed options. Copy of the record or of a selected record is removed. Link is simplified by removing the parsed expression that allowed complex path update. It is simpler to write code than write python-like expression in char fields; * remove 'use_write' options. It now simply updates a record; * remove 'write_expression' as it is replaced by code actions; * remove 'ref_object' not used anymore with the removal of "choose a record"; * remove helper to build an expression not used anymore with the removal of "write expression"; * remove object ID finder; * removed template display when choosing an email template; just go on the template if you want more details; * refactor server action form view to reflect changes. It will be used in future commits as base view for automated and scheduled actions; * add 'sequence' in list view; * add new 'usage' selection field allowing to distinguish which model uses the server action. Indeed as server action will soon be used in scheduled or automated actions having a clue about the usage is always helpful; Thanks to @fpodoo for the original idea and preliminary work. Thanks to @jpr-odoo for first developments. Thanks to @jem-odoo and @rco-odoo for reviewing.
Diffstat (limited to 'addons/hr_contract/data/hr_contract_data.xml')
-rw-r--r--addons/hr_contract/data/hr_contract_data.xml2
1 files changed, 0 insertions, 2 deletions
diff --git a/addons/hr_contract/data/hr_contract_data.xml b/addons/hr_contract/data/hr_contract_data.xml
index 699e7160b6b..39ffc30e598 100644
--- a/addons/hr_contract/data/hr_contract_data.xml
+++ b/addons/hr_contract/data/hr_contract_data.xml
@@ -51,7 +51,6 @@
<record id="contract_set_as_pending" model="ir.actions.server">
<field name="name">HR Contract: set as pending</field>
<field name="model_id" ref="model_hr_contract"/>
- <field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code">record.set_as_pending()</field>
@@ -82,7 +81,6 @@
<record id="contract_set_as_close" model="ir.actions.server">
<field name="name">HR Contract: set as close</field>
<field name="model_id" ref="model_hr_contract"/>
- <field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="state">code</field>
<field name="code">record.set_as_close()</field>