Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[12.0][IMP] hr_holidays_leave_auto_approve: Auto-approve for everyone
- Loading branch information
Jaime Arroyo
committed
Nov 19, 2019
1 parent
7e0ce2b
commit 44f2984
Showing
10 changed files
with
97 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
hr_holidays_leave_auto_approve/migrations/12.0.2.0.0/post-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2019 Eficent <http://www.eficent.com> | ||
# Copyright 2019 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
cr = env.cr | ||
if openupgrade.column_exists(cr, 'hr_leave_type', 'auto_approve'): | ||
openupgrade.logged_query( | ||
cr, """ | ||
UPDATE hr_leave_type | ||
SET auto_approve_policy = 'hr' | ||
WHERE auto_approve | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
Get sure that the administrative user belongs at least to the group | ||
Leaves/Officer. | ||
|
||
If you wish that the system automatically validates all the leave requests | ||
If you wish that the system automatically validates the leave requests | ||
belonging to a specific leave type, please follow the steps below. | ||
|
||
#. Go on the leave type configuration menu | ||
#. Select the leave type you wish to setup | ||
#. Mark the flag 'Auto Validate'. | ||
#. Select the auto approve policy for that leave type. | ||
|
||
The option 'Auto Validated by HR' will auto validate leave requests created by | ||
HR Officers while option 'Auto Validated by Everyone' will auto validate all | ||
leave requests of the selected type, no matter who requested it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
* Andrea Stirpe <a.stirpe@onestein.nl> | ||
* Antonio Esposito <a.esposito@onestein.nl> | ||
* Jaime Arroyo <jaime.arroyo@creublanca.es> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters