-
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.
Merge pull request #388 from beescoop/12.0-no-double-penalty
[FIX] beesdoo_worker_status: Try not to apply penalty twice in a row
- Loading branch information
Showing
7 changed files
with
128 additions
and
12 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
13 changes: 13 additions & 0 deletions
13
beesdoo_worker_status/migrations/12.0.1.1.0/post-migrate.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,13 @@ | ||
# SPDX-FileCopyrightText: 2022 Coop IT Easy SCRLfs | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
|
||
def migrate(cr, version): | ||
cr.execute( | ||
""" | ||
UPDATE cooperative_status | ||
SET is_penalised_irregular = TRUE | ||
WHERE sr < 0 | ||
""" | ||
) |
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,13 @@ | ||
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>`_) |
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