-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] hr_timesheet_overtime_rate_holidays
I really dislike writing Odoo tests. They take so so so so long to write, building a global state like a house of cards. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
- Loading branch information
1 parent
a111618
commit 2d85032
Showing
12 changed files
with
627 additions
and
0 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,70 @@ | ||
=============================================== | ||
Timesheet - Overtime and holidays compatibility | ||
=============================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:c66f9b84bace8273e5d1ae17aee636c58bb8bc63a2bc85c58efc080a59033467 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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-coopiteasy%2Fcie--timesheet-lightgray.png?logo=github | ||
:target: https://github.com/coopiteasy/cie-timesheet/tree/16.0/hr_timesheet_overtime_rate_holidays | ||
:alt: coopiteasy/cie-timesheet | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
When timesheet lines are made from a holiday, they are never counted as overtime. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/cie-timesheet/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/coopiteasy/cie-timesheet/issues/new?body=module:%20hr_timesheet_overtime_rate_holidays%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 | ||
~~~~~~~ | ||
|
||
* Coop IT Easy SC | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* `Coop IT Easy SC <https://coopiteasy.be>`_: | ||
|
||
* Carmen Bianca BAKKER | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
.. |maintainer-carmenbianca| image:: https://github.com/carmenbianca.png?size=40px | ||
:target: https://github.com/carmenbianca | ||
:alt: carmenbianca | ||
|
||
Current maintainer: | ||
|
||
|maintainer-carmenbianca| | ||
|
||
This module is part of the `coopiteasy/cie-timesheet <https://github.com/coopiteasy/cie-timesheet/tree/16.0/hr_timesheet_overtime_rate_holidays>`_ 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,5 @@ | ||
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
from . import models |
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,23 @@ | ||
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
{ | ||
"name": "Timesheet - Overtime and holidays compatibility", | ||
"summary": """ | ||
When timesheet lines are made from a holiday, they are never counted | ||
as overtime.""", | ||
"version": "16.0.1.0.0", | ||
"category": "Human Resources", | ||
"website": "https://github.com/coopiteasy/cie-timesheet", | ||
"author": "Coop IT Easy SC", | ||
"maintainers": ["carmenbianca"], | ||
"license": "AGPL-3", | ||
"application": False, | ||
"depends": [ | ||
"project_timesheet_holidays", | ||
"hr_timesheet_overtime_rate", | ||
], | ||
# TODO: Should this be enabled? | ||
# "auto_install": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
from . import account_analytic_line |
14 changes: 14 additions & 0 deletions
14
hr_timesheet_overtime_rate_holidays/models/account_analytic_line.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,14 @@ | ||
# SPDX-FileCopyrightText: 2024 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
from odoo import models | ||
|
||
|
||
class AnalyticLine(models.Model): | ||
_inherit = "account.analytic.line" | ||
|
||
def get_rate(self): | ||
if self.holiday_id: | ||
return 1 | ||
return super().get_rate() |
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 @@ | ||
* `Coop IT Easy SC <https://coopiteasy.be>`_: | ||
|
||
* Carmen Bianca BAKKER |
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 @@ | ||
When timesheet lines are made from a holiday, they are never counted as overtime. |
Oops, something went wrong.