Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
==================================================================
Contract-Constrained Attendance Work Entries Generation Validation
==================================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5c0211c555e54b39b003a44f704e48a04340696212bb46bdb2239acdec40006c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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_constrained_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_constrained_attendance`` and
``hr_work_entry_validation`` (through
``hr_work_entry_contract_attendance_validation``, which would conflict
otherwise).

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/cie-hr/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-hr/issues/new?body=module:%20hr_work_entry_contract_constrained_attendance_validation%0Aversion:%2018.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>`__:

- hugues de keyzer

Maintainers
-----------

This module is part of the `coopiteasy/cie-hr <https://github.com/coopiteasy/cie-hr/tree/18.0/hr_work_entry_contract_constrained_attendance_validation>`_ project on GitHub.

You are welcome to contribute.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: 2026 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

from . import models
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-FileCopyrightText: 2026 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

{
"name": "Contract-Constrained 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_constrained_attendance",
"hr_work_entry_validation",
],
"auto_install": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: 2026 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

from . import hr_contract
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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):
# this context key tells modules on which this one depends to not
# compute this, as it would yield incorrect results (validated
# attendance intervals would be invisible to the contract-constrained
# work entry generation code, which would consider the employee as
# absent during these intervals) and we need to do it afterwards.
intervals = super(
HrContract, self.with_context(hr_work_entry_subtract_validated=False)
)._get_attendance_intervals(start_dt, end_dt)
intervals = self.env["hr.work.entry"].subtract_validated_work_entries(
start_dt, end_dt, intervals
)
return intervals
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* [Coop IT Easy SC](https://coopiteasy.be):
* hugues de keyzer
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Take validated work entries into account when generating work entries.

This is a glue module between `hr_work_entry_contract_constrained_attendance` and `hr_work_entry_validation` (through `hr_work_entry_contract_attendance_validation`, which would conflict otherwise).
Loading
Loading