-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by remytms
- Loading branch information
Showing
23 changed files
with
1,850 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../shift_worker_status |
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,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
===================== | ||
Worker Status manager | ||
===================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:1264e1a467f997c42caa77a8b8f5428eaed9940ac16bbe707abe2b48ed4c5870 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-beescoop%2FObeesdoo-lightgray.png?logo=github | ||
:target: https://github.com/beescoop/Obeesdoo/tree/16.0/shift_worker_status | ||
:alt: beescoop/Obeesdoo | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
Worker status management. | ||
|
||
|
||
* add "irregular penalty" config in shift settings | ||
* compute next countdown date and future alert date for irregular | ||
workers, taking into account holidays and exemption status | ||
* compute the future alert date for irregular workers, taking into | ||
account holidays and exemption status | ||
* compute regular and irregular statuses according to alert start day, | ||
alert delay, grace delay and time extensions, taking into account | ||
holidays and exemption status | ||
* recompute status and counters when a shift undergoes a state change | ||
* postpone alert start time based on holidays and extension status | ||
* handle is_regular and is_compensation consistency on shifts, on worker | ||
change and by raising a validation error if the fields are not | ||
properly set | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Changelog | ||
========= | ||
|
||
12.0.1.1.0 (2022-06-23) | ||
**Features** | ||
|
||
- Do not apply a penalty to irregular customers twice in a row. Best explained | ||
through an example. | ||
|
||
Imagine the following 'sr' of an irregular worker: | ||
|
||
0 -> -2 (cron, penalty) -> -1 (work a shift) -> 0 (work another shift) | ||
-> ??? (cron) | ||
|
||
The last step should go to -1 instead of -2. The penalty should not be given | ||
again until sr has reached 1. (`#388 <https://github.com/beescoop/obeesdoo/issues/388>`_) | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/beescoop/Obeesdoo/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/beescoop/Obeesdoo/issues/new?body=module:%20shift_worker_status%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Thibault Francois | ||
* Elouan Le Bars | ||
* Coop IT Easy SC | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* BEES coop - Cellule IT | ||
* Coop IT Easy SC | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is part of the `beescoop/Obeesdoo <https://github.com/beescoop/Obeesdoo/tree/16.0/shift_worker_status>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
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,3 @@ | ||
from . import models | ||
from .rename_beesdoo import rename_beesdoo | ||
from .post_init import post_init |
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,26 @@ | ||
# Copyright 2020 Coop IT Easy SCRL fs | ||
# Elouan Le Bars <elouan@coopiteasy.be> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Worker Status manager", | ||
"summary": """ | ||
Worker status management.""", | ||
"author": ( | ||
"Thibault Francois, " | ||
"Elouan Le Bars, " | ||
"Coop IT Easy SC, " | ||
"Odoo Community Association (OCA)" | ||
), | ||
"website": "https://github.com/beescoop/Obeesdoo", | ||
"category": "Cooperative management", | ||
"version": "16.0.1.0.0", | ||
"depends": ["shift"], | ||
"data": [ | ||
"data/data.xml", | ||
"views/res_config_settings_view.xml", | ||
], | ||
"demo": ["demo/tasks.xml"], | ||
"license": "AGPL-3", | ||
"pre_init_hook": "rename_beesdoo", | ||
"post_init_hook": "post_init", | ||
} |
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,20 @@ | ||
<?xml version="1.0" ?> | ||
<odoo noupdate="1"> | ||
<!-- | ||
when this parameter is set to false, the ir.config_parameter is | ||
deleted, along with its corresponding ir.model.data record. this | ||
normally causes this record to be re-created when updating the | ||
module, even though it is set as noupdate, because it is seen as | ||
new data, effectively resetting the value to true. the forcecreate | ||
property set to false ensures that this record is not recreated on | ||
module update. | ||
--> | ||
<record | ||
id="param_config_irregular_penalty" | ||
model="ir.config_parameter" | ||
forcecreate="false" | ||
> | ||
<field name="key">shift_worker_status.irregular_penalty</field> | ||
<field name="value">True</field> | ||
</record> | ||
</odoo> |
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,55 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
Copyright 2019 Coop IT Easy | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
--> | ||
<odoo> | ||
|
||
<record id="shift_task_template_1_demo" model="shift.template"> | ||
<field name="name">A_LUN_7:00-9:30</field> | ||
<field name="planning_id" ref="shift.shift_planning_1_demo" /> | ||
<field name="day_nb_id" ref="shift.shift_daynumber_1_demo" /> | ||
<field name="task_type_id" ref="shift.shift_task_type_3_demo" /> | ||
<field name="start_time">7</field> | ||
<field name="end_time">9.5</field> | ||
<field name="duration">2.5</field> | ||
<field name="worker_nb">12</field> | ||
<field | ||
name="worker_ids" | ||
eval="[(6, 0, [ref('shift.res_partner_worker_1_demo')])]" | ||
/> | ||
</record> | ||
|
||
<record id="shift_task_template_2_demo" model="shift.template"> | ||
<field name="name">A_MAR_12:00-14:30</field> | ||
<field name="planning_id" ref="shift.shift_planning_1_demo" /> | ||
<field name="day_nb_id" ref="shift.shift_daynumber_2_demo" /> | ||
<field name="task_type_id" ref="shift.shift_task_type_2_demo" /> | ||
<field name="start_time">12</field> | ||
<field name="end_time">14.5</field> | ||
<field name="duration">2.5</field> | ||
<field name="worker_nb">9</field> | ||
<!-- WARNING: issue, worker not registered in demo --> | ||
<field | ||
name="worker_ids" | ||
eval="[(6, 0, [ref('shift.res_partner_worker_3_demo')])]" | ||
/> | ||
</record> | ||
|
||
<record id="shift_task_template_3_demo" model="shift.template"> | ||
<field name="name">A_VEN_7:00-9:30</field> | ||
<field name="planning_id" ref="shift.shift_planning_1_demo" /> | ||
<field name="day_nb_id" ref="shift.shift_daynumber_5_demo" /> | ||
<field name="task_type_id" ref="shift.shift_task_type_1_demo" /> | ||
<field name="start_time">7</field> | ||
<field name="end_time">9.5</field> | ||
<field name="duration">2.5</field> | ||
<field name="worker_nb">7</field> | ||
<!-- WARNING: issue, worker not registered in demo --> | ||
<field | ||
name="worker_ids" | ||
eval="[(6, 0, [ref('shift.res_partner_worker_6_demo')])]" | ||
/> | ||
</record> | ||
|
||
</odoo> |
Oops, something went wrong.