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
65 changes: 65 additions & 0 deletions hr_work_entry_contract_attendance_validation/README.rst
Original file line number Diff line number Diff line change
@@ -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 <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_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_attendance_validation>`_ project on GitHub.

You are welcome to contribute.
5 changes: 5 additions & 0 deletions hr_work_entry_contract_attendance_validation/__init__.py
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
18 changes: 18 additions & 0 deletions hr_work_entry_contract_attendance_validation/__manifest__.py
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": "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,
}
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
20 changes: 20 additions & 0 deletions hr_work_entry_contract_attendance_validation/models/hr_contract.py
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions hr_work_entry_contract_attendance_validation/pyproject.toml
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_attendance_oca` and `hr_work_entry_validation`.
Loading
Loading