diff --git a/hr_work_entry_contract_attendance_validation/README.rst b/hr_work_entry_contract_attendance_validation/README.rst new file mode 100644 index 0000000..5364e14 --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/README.rst @@ -0,0 +1,65 @@ +============================================= +Attendance Work Entries Generation Validation +============================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:742578cf9cb62dc8482162d9f35bd719c92ebd6904b90af28aea8c82dda8b964 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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--hr-lightgray.png?logo=github + :target: https://github.com/coopiteasy/cie-hr/tree/18.0/hr_work_entry_contract_attendance_validation + :alt: coopiteasy/cie-hr + +|badge1| |badge2| |badge3| + +Take validated work entries into account when generating work entries. + +This is a glue module between ``hr_work_entry_contract_attendance_oca`` +and ``hr_work_entry_validation``. + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Coop IT Easy SC + +Contributors +------------ + +- `Coop IT Easy SC `__: + + - hugues de keyzer + +Maintainers +----------- + +This module is part of the `coopiteasy/cie-hr `_ project on GitHub. + +You are welcome to contribute. diff --git a/hr_work_entry_contract_attendance_validation/__init__.py b/hr_work_entry_contract_attendance_validation/__init__.py new file mode 100644 index 0000000..c581248 --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import models diff --git a/hr_work_entry_contract_attendance_validation/__manifest__.py b/hr_work_entry_contract_attendance_validation/__manifest__.py new file mode 100644 index 0000000..81e828a --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/__manifest__.py @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: 2026 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +{ + "name": "Attendance Work Entries Generation Validation", + "summary": "Take validated work entries into account when generating work entries", + "version": "18.0.1.0.0", + "category": "Human Resources/Employees", + "website": "https://github.com/coopiteasy/cie-hr", + "author": "Coop IT Easy SC", + "license": "AGPL-3", + "depends": [ + "hr_work_entry_contract_attendance_oca", + "hr_work_entry_validation", + ], + "auto_install": True, +} diff --git a/hr_work_entry_contract_attendance_validation/models/__init__.py b/hr_work_entry_contract_attendance_validation/models/__init__.py new file mode 100644 index 0000000..9dbf0d1 --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/models/__init__.py @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from . import hr_contract diff --git a/hr_work_entry_contract_attendance_validation/models/hr_contract.py b/hr_work_entry_contract_attendance_validation/models/hr_contract.py new file mode 100644 index 0000000..2d4ca29 --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/models/hr_contract.py @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2026 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import models + + +class HrContract(models.Model): + _inherit = "hr.contract" + + def _get_attendance_intervals(self, start_dt, end_dt): + intervals = super()._get_attendance_intervals(start_dt, end_dt) + # this context key allows dependent modules to compute this themselves + # if needed (because they need the validated intervals to be still + # present during the computation, for example). + if self.env.context.get("hr_work_entry_subtract_validated", True): + intervals = self.env["hr.work.entry"].subtract_validated_work_entries( + start_dt, end_dt, intervals + ) + return intervals diff --git a/hr_work_entry_contract_attendance_validation/pyproject.toml b/hr_work_entry_contract_attendance_validation/pyproject.toml new file mode 100644 index 0000000..4231d0c --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/hr_work_entry_contract_attendance_validation/readme/CONTRIBUTORS.md b/hr_work_entry_contract_attendance_validation/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..c8cb5ac --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +* [Coop IT Easy SC](https://coopiteasy.be): + * hugues de keyzer diff --git a/hr_work_entry_contract_attendance_validation/readme/DESCRIPTION.md b/hr_work_entry_contract_attendance_validation/readme/DESCRIPTION.md new file mode 100644 index 0000000..bdc7020 --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +Take validated work entries into account when generating work entries. + +This is a glue module between `hr_work_entry_contract_attendance_oca` and `hr_work_entry_validation`. diff --git a/hr_work_entry_contract_attendance_validation/static/description/index.html b/hr_work_entry_contract_attendance_validation/static/description/index.html new file mode 100644 index 0000000..4e10c7d --- /dev/null +++ b/hr_work_entry_contract_attendance_validation/static/description/index.html @@ -0,0 +1,421 @@ + + + + + +Attendance Work Entries Generation Validation + + + +
+

Attendance Work Entries Generation Validation

+ + +

Beta License: AGPL-3 coopiteasy/cie-hr

+

Take validated work entries into account when generating work entries.

+

This is a glue module between hr_work_entry_contract_attendance_oca +and hr_work_entry_validation.

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Coop IT Easy SC
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is part of the coopiteasy/cie-hr project on GitHub.

+

You are welcome to contribute.

+
+
+
+ +