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
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Configuration for known file extensions
[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[.eslintrc,*.{json,yml,yaml,rst,md}]
indent_size = 2

# Do not configure editor for libs and autogenerated content
[*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = false
trim_trailing_whitespace = false
107 changes: 107 additions & 0 deletions hr_holidays_hour/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

=========================
Leave Management in hours
=========================

The standard Odoo application "Leave Management" allows employees to create
leave allocations and requests by defining their duration in days.

By installing this module, the duration of the leaves will be expressed in hours,
instead of days. In the leave form, a new field "duration" (in hours) will be displayed
and the original field "duration" (in days) will be hidden.

As an example, let's say that a working day for an employee is 8 hours:

* 1 day = 8 hours
* 2 days = 16 hours
* 0.5 days (half day) = 4 hours
* 0.125 days = 1 hour

etc...

If the employee wants to request a leave of one hour:

* with the standard Odoo app "Leave Management" the employee would write 0.125 days
* with module "hr_holidays_hour" installed, the employee writes 1.0 hour

If the employee wants to request half a day:

* with the standard Odoo app "Leave Management" the employee would write 0.5 days
* with module "hr_holidays_hour" installed, the employee writes 4.0 hours


In case a working time schedule is defined for an employee, the duration (in hours) will be
automatically filled while setting the starting date and the ending date of a leave request.
If the "Working Time" is not set for the employee, but the employee has contracts with
a working schedule, the duration (in hours) will be automatically filled as well.

Usage
=====

To request a leave, an employee can:

#. From menu Leaves, create a Leave Request by setting the duration in hours (instead of days)

To allocate hours for an employee:

#. From menu Leaves, create an Allocation Request by setting the duration in hours (instead of days)

To fully benefit from this module, the HR Officer should set a working schedule for the employees.
The duration (in hours) will be automatically filled while setting the start and the end date of a leave.
In this case, the employee requesting a leave is still able to adjust the hours manually.

To set a working schedule for an employee:

#. From menu Employees -> Employees, select one employee
#. Click on Contracts and select the employee's actual contract
#. Set the "Working Schedule" field


.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/116/10.0


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 smash it by providing detailed and welcomed feedback.

Credits
=======

Tests for `resource_calendar` are repeated from the Odoo SA standard module `resource`.

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Antonio Esposito <[email protected]>
* Andrea Stirpe <[email protected]>

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

Maintainer
----------

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

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.
5 changes: 5 additions & 0 deletions hr_holidays_hour/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
from . import report
23 changes: 23 additions & 0 deletions hr_holidays_hour/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Onestein (<http://www.onestein.eu>)
# Copyright 2019 Coop IT Easy SCRLfs
# - Vincent Van Rossem <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Leave Management in hours",
"summary": "Holidays, Allocation and Leave Requests in Hours",
"author": "Coop IT Easy SCRLfs, Onestein, Odoo Community Association (OCA)",
"website": "http://www.onestein.eu",
"category": "Human Resources",
"version": "9.0.1.0.0",
"license": "AGPL-3",
"depends": ["hr_holidays", "hr_contract"],
"data": [
"security/ir.model.access.csv",
"views/hr_holidays.xml",
"views/hr_holidays_status.xml",
"report/hr_holidays_report_view.xml",
],
"installable": True,
}
161 changes: 161 additions & 0 deletions hr_holidays_hour/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_holidays_hour
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2018-12-18 15:58+0000\n"
"Last-Translator: Maria Sparenberg <[email protected]>\n"
"Language-Team: none\n"
"Language: de\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"
"X-Generator: Weblate 3.3\n"

#. module: hr_holidays_hour
#: code:addons/hr_holidays_hour/models/hr_holidays.py:159
#, python-format
msgid "%s on %s : %.2f hour(s)"
msgstr "%s mit Urlaubstyp: %s : %.2f Stunde(n)"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_number_of_hours_temp
msgid "Allocation in Hours"
msgstr "Reservierung in Stunden"

#. module: hr_holidays_hour
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_allocation_tree_inherit_leave_hours
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_inherit_leave_hours
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_simple_inherit_leave_hours
msgid "Approved Hours"
msgstr "Genehmigte Stunden"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_remaining_leaves_user_no_of_hours
msgid "Approved hours"
msgstr "Genehmigte Stunden"

#. module: hr_holidays_hour
#: model:ir.model,name:hr_holidays_hour.model_hr_employee
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_remaining_leaves_user_employee_id
msgid "Employee"
msgstr "Angestellte(r)"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_employee_holiday_ids
msgid "Holidays"
msgstr "Feiertage"

#. module: hr_holidays_hour
#: model:ir.ui.view,arch_db:hr_holidays_hour.edit_holiday_new_inherit_leave_hours
msgid "Hours"
msgstr "Stunden"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_status_hours_taken
msgid "Hours Already Taken"
msgstr "Bereits genommene Stunden"

#. module: hr_holidays_hour
#: model:ir.model,name:hr_holidays_hour.model_hr_holidays
msgid "Leave"
msgstr "Urlaub"

#. module: hr_holidays_hour
#: model:ir.model,name:hr_holidays_hour.model_hr_holidays_status
msgid "Leave Type"
msgstr "Urlaubsart"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_status_max_hours
msgid "Maximum Allowed Hours"
msgstr "Maximal erlaubte Anzahl von Stunden"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_number_of_hours
msgid "Number of hours"
msgstr "Anzahl von Stunden"

#. module: hr_holidays_hour
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_allocation_tree_inherit_leave_hours
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_inherit_leave_hours
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_simple_inherit_leave_hours
msgid "Remaining Hours"
msgstr "Verbleibende Stunden"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_status_remaining_hours
msgid "Remaining hours"
msgstr "Verbleibende Stunden"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_employee_remaining_hours_ids
msgid "Remaining hours per Leave Type"
msgstr "Verbleibende Stunden pro Urlaubsart"

#. module: hr_holidays_hour
#: model:ir.model,name:hr_holidays_hour.model_resource_calendar
msgid "Resource Calendar"
msgstr "Ressourcenkalender"

#. module: hr_holidays_hour
#: code:addons/hr_holidays_hour/models/hr_holidays.py:71
#, python-format
msgid "Set an employee first!"
msgstr "Wählen Sie zuerst einen Angestellten!"

#. module: hr_holidays_hour
#: code:addons/hr_holidays_hour/models/hr_holidays.py:150
#, python-format
msgid ""
"The number of remaining hours is not sufficient for this leave type.\n"
"Please check for allocation requests awaiting validation."
msgstr ""
"Die Anzahl der verbleibenden Stunden dieser Urlaubsart ist nicht "
"ausreichend.\n"
"Bitte prüfen Sie die zur Genehmigung stehenden Urlaubsanträge."

#. module: hr_holidays_hour
#: code:addons/hr_holidays_hour/models/hr_holidays.py:62
#, python-format
msgid "The start date must be anterior to the end date."
msgstr "Das Startdatum muss vor dem Enddatum liegen."

#. module: hr_holidays_hour
#: model:ir.model,name:hr_holidays_hour.model_hr_holidays_remaining_leaves_user
msgid "Total holidays by type"
msgstr "Gesamt-Urlaub pro Urlaubsart"

#. module: hr_holidays_hour
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_allocation_tree_inherit_leave_hours
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_inherit_leave_hours
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_simple_inherit_leave_hours
msgid "Virtual Hours"
msgstr "Virtuelle Stunden"

#. module: hr_holidays_hour
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_allocation_tree_inherit_leave_hours
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_inherit_leave_hours
#: model:ir.ui.view,arch_db:hr_holidays_hour.view_holiday_simple_inherit_leave_hours
msgid "Virtual Remaining Hours"
msgstr "Virtuelle, verbleibende Stunden"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_remaining_leaves_user_virtual_hours
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_virtual_hours
msgid "Virtual hours"
msgstr "Virtuelle Stunden"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_status_virtual_remaining_hours
msgid "Virtual remaining hours"
msgstr "Virtuelle, verbleibende Stunden"

#. module: hr_holidays_hour
#: model:ir.model.fields,field_description:hr_holidays_hour.field_hr_holidays_working_hours
msgid "Working hours"
msgstr "Arbeitsstunden"
Loading