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
111 changes: 111 additions & 0 deletions hr_work_entry_contract_attendance_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
===================================
Work Entries from Attendances (OCA)
===================================

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

.. |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-OCA%2Fhr-lightgray.png?logo=github
:target: https://github.com/OCA/hr/tree/18.0/hr_work_entry_contract_attendance_oca
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-18-0/hr-18-0-hr_work_entry_contract_attendance_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Generate work entries from attendances.

**Table of contents**

.. contents::
:local:

Configuration
=============

The work entry type to use for work entries generated from attendances
can be configured in the Employees settings, Work Entries section.

Usage
=====

Currently, work entries for attendances are not created automatically
(see `roadmap <#known-issues-roadmap>`__). Instead, they must be
generated by using the "Regenerate Work Entries" wizard from the work
entry views.

Separate work entries are created for each attendance. The generated
work entries are not restricted to the working schedule: only the lunch
breaks are removed (if they are present in the working schedule).

.. note::

The ``hr_work_entry_usability`` module is useful to be able to access
work entries more easily, as it adds menu entries for them.

Known issues / Roadmap
======================

These features are not yet implemented, but would be quite useful:

- Generate work entries automatically when attendances are
created/modified.
- Update/delete (draft) work entries when attendances are
modified/deleted.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/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/OCA/hr/issues/new?body=module:%20hr_work_entry_contract_attendance_oca%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 maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/18.0/hr_work_entry_contract_attendance_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions hr_work_entry_contract_attendance_oca/__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
22 changes: 22 additions & 0 deletions hr_work_entry_contract_attendance_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: 2026 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

{
"name": "Work Entries from Attendances (OCA)",
"summary": "Generate work entries from attendances",
"version": "18.0.1.0.0",
"category": "Human Resources/Employees",
"website": "https://github.com/OCA/hr",
"author": "Coop IT Easy SC, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
"hr_attendance",
"hr_work_entry_contract",
],
"data": [
"views/hr_contract_views.xml",
"views/hr_work_entry_views.xml",
"views/res_config_settings_views.xml",
],
}
86 changes: 86 additions & 0 deletions hr_work_entry_contract_attendance_oca/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_work_entry_contract_attendance_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields,help:hr_work_entry_contract_attendance_oca.field_hr_contract__work_entry_source
msgid ""
"\n"
" Defines the source for work entries generation\n"
"\n"
" Working Schedule: Work entries will be generated from the working "
"hours below.\n"
" Attendances: Work entries will be generated from the employee's "
"attendances. (requires Attendance app)\n"
" Planning: Work entries will be generated from the employee's "
"planning. (requires Planning app)\n"
" "
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_hr_attendance
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_hr_work_entry__attendance_id
msgid "Attendance"
msgstr "Présence"

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_res_company__attendance_hr_work_entry_type_id
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_res_config_settings__attendance_hr_work_entry_type_id
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract_attendance_oca.res_config_settings_view_form
msgid "Attendance Work Entry Type"
msgstr "Type de prestation pour les présences"

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields.selection,name:hr_work_entry_contract_attendance_oca.selection__hr_contract__work_entry_source__attendance_oca
msgid "Attendances"
msgstr "Présences"

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_res_company
msgid "Companies"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_hr_contract
msgid "Employee Contract"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_hr_work_entry
msgid "HR Work Entry"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_hr_attendance__work_entry_ids
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract_attendance_oca.res_config_settings_view_form
msgid "Work Entries"
msgstr "Prestations"

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_hr_contract__work_entry_source
msgid "Work Entry Source"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract_attendance_oca.res_config_settings_view_form
msgid "Work entry type to use for work entries corresponding to an attendance."
msgstr ""
"Type de prestation à utiliser pour les prestations correspondant à une "
"présence."
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_work_entry_contract_attendance_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields,help:hr_work_entry_contract_attendance_oca.field_hr_contract__work_entry_source
msgid ""
"\n"
" Defines the source for work entries generation\n"
"\n"
" Working Schedule: Work entries will be generated from the working hours below.\n"
" Attendances: Work entries will be generated from the employee's attendances. (requires Attendance app)\n"
" Planning: Work entries will be generated from the employee's planning. (requires Planning app)\n"
" "
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_hr_attendance
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_hr_work_entry__attendance_id
msgid "Attendance"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_res_company__attendance_hr_work_entry_type_id
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_res_config_settings__attendance_hr_work_entry_type_id
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract_attendance_oca.res_config_settings_view_form
msgid "Attendance Work Entry Type"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields.selection,name:hr_work_entry_contract_attendance_oca.selection__hr_contract__work_entry_source__attendance_oca
msgid "Attendances"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_res_company
msgid "Companies"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_hr_contract
msgid "Employee Contract"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model,name:hr_work_entry_contract_attendance_oca.model_hr_work_entry
msgid "HR Work Entry"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_hr_attendance__work_entry_ids
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract_attendance_oca.res_config_settings_view_form
msgid "Work Entries"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model:ir.model.fields,field_description:hr_work_entry_contract_attendance_oca.field_hr_contract__work_entry_source
msgid "Work Entry Source"
msgstr ""

#. module: hr_work_entry_contract_attendance_oca
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract_attendance_oca.res_config_settings_view_form
msgid ""
"Work entry type to use for work entries corresponding to an attendance."
msgstr ""
9 changes: 9 additions & 0 deletions hr_work_entry_contract_attendance_oca/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2026 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

from . import hr_attendance
from . import hr_contract
from . import hr_work_entry
from . import res_company
from . import res_config_settings
11 changes: 11 additions & 0 deletions hr_work_entry_contract_attendance_oca/models/hr_attendance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2026 Coop IT Easy SC
#
# SPDX-License-Identifier: AGPL-3.0-or-later

from odoo import fields, models


class HrAttendance(models.Model):
_inherit = "hr.attendance"

work_entry_ids = fields.One2many("hr.work.entry", "attendance_id", "Work Entries")
Loading