Commit Graph
7 Commits
Author SHA1 Message Date
Thibault Delavallée ba76985196 [IMP][FIX] hr_contract: merge both state update cron into onee and fix the method
Purpose

 * lessen number of crons in Odoo
 * fix the method that seems buggy, probably to backport
2017-07-11 15:59:10 +02:00
Thibault Delavallée b9c37e794b [IMP] hr_contract: remove dependency to base_automation
Purpose of this commit is to remove the link between Hr Contracts and
base automation. This has two consequences

 * automated actions used to compute contracts state are transformed
   into scheduled actions. Crons will do the job just as fine;
 * option to use employee contract in automated actions is removed
   and put in its own bridge module;

This allows to remove the dependency between the two addons.
2017-01-03 19:11:08 +01:00
Yannick Tivisse 319a939339 [MOV] base_action_rule: rename and move base_action_rule to base_automation
First step towards cleaning and improving automated actions is to
correctly name things. base_action_rule module is therefore renamed
to base_automation. Model is also renamed to base.automation.
2017-01-03 19:11:07 +01:00
Yannick Tivisse 8fa9f7d6d4 [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.
2017-01-03 19:11:06 +01:00
Jeremy Kersten a55ee3858c [FIX] *: convert action server to new syntax
Use record / records instead of deprecated locals
2016-11-18 10:03:48 +01:00
fka-odoo 095d0174fd [MIG] hr_contract : migrate the code to new api 2016-04-14 10:47:39 +02:00
fka-odoo 2196b511ee [MOV] hr_contract: organised files in data, models and views directory 2016-04-14 10:47:38 +02:00