Search 1.6 billion lines of Odoo code on GitHub


Author: Compassion Switzerland, Odoo Community Association (OCA)
License: AGPL-3
Branch: 12.0
Repository: CompassionCH/compassion-modules
Dependencies: hr, hr_attendance, hr_contract, hr_employee_calendar_planning, hr_holidays, hr_holidays_public, resource, and web
Languages: HTML (412, 9.6%), JavaScript (155, 3.6%), PO File (110, 2.6%), Python (2390, 55.8%), XML (1070, 25.0%), and reStructuredText (144, 3.4%)
Other branches: 11.0, and devel
Other repositories: CompassionCH/hr, Grazia976/compassion-modules, Quillasp/compassion-modules, SylvainLosey/compassion-modules, Theyiot/compassion-modules, c-meier/compassion-modules, davidwul/compassion-accounting, davidwul/compassion-modules, ecino/compassion-modules, eicher31/compassion-modules, joblo-compassion/compassion-modules, jonathantarabbia/compassion-modules, josueBulle/compassion-modules, nfluckiger/compassion-modules, quentingigon/compassion-modules, vidtsin/compassion-modules, and wvmrtn/compassion-modules

HR (Extra) Hours Management

Beta License: AGPL-3 compassionCH/compassion-modules

This module extends the functionality of hr_attendance and allows to keep track of the work hours of the employees, gives better overview of the work hours and follow the extra hours balance.

You can set in the schedule of the employee how much time they are supposed to work on a daily basis, allow a maximum extra hours limit, and add minimum break time required. You will better keep track of the extra hours balance of the employees given all the rules that you setup.

Furthermore, you can easily calculate the balance of an employee using the period system, which calculates the balance between two dates. Actual balance is based on the balance of the last period to avoid having to do many computations.

With this module, logging your hours is made easy in Odoo!

Table of contents


To configure this module, go in Attendances/Configuration/Attendance Settings:

  1. You can configure a free break time that is offered to employees. It means this time will count as a break time but won't be deduced from the attendance of the employees.
  2. You can configure a maximum extra hours limit. When the employee makes more extra hours than the limit, it doesn't increase anymore his extra hours balance. This module offers to disable this continuous limit for some employee via the continuous extra hours computation flag in Employee. When unset, the limit will only be enforced once per year.
  3. In Attendances/Configuration/Break rules you can define a minimum break time required per day based on how many hours the employee worked on the day. Total break is the total break time the employee must do per day Minimum break is the minimum time required for at least one break (for instance if the employee should take at least 30 minutes of break for lunch)
  4. In Attendances/Configuration/Coefficient you can define special days that will give more extra hours to the employee. For instance you could set the Sunday to count 1.5x time. You can limit those rules to specific categories of employees.
  5. In Attendances/Manage Attendances/Employee you can setup the initial balance of each employee, when you start using the module to count the hours. Just go in one employee, under the Hours tab, and set the value. The value will be updated each year to avoid computing over more than one year of attendances.
  6. In Attendances/Manage Attendances/Employee you can setup a continuous extra hours computation for each employee. When unset, this allows the employee to get over the max_extra_hours limit. The max_extra_hours will however be enforced at the annual hours computation. The date of this computation can be set in Attendance/Configuration/Next Balance Cron Execution.
  7. In Employee/Contracts/Working Schedule configure the working schedule of each employee by going to the resource.calendar object
  8. In Leaves/Configuration/Leave Types configure if leave types should not deduce from the due hours of the employees by setting Keep due hours

To configure the cron which updates the balance of employees annually, go in Settings/Technical/Automation/Automated Actions:

  1. In the cron Compute annual extra hours balance choose the scheduled date on which you want to apply the process to move the extra hours of employees in their annual balance and cap off the extra hours of employee with an annual extra hours computation. This is typically done at the beginning of the year. This process avoids the system to compute a huge amount of data after a few years of attendance.


As an employee, you continue to log your attendance as before with the base module hr_attendance. But you have now new views to keep track of your extra hours evolution.

  1. In Attendances/Manage Attendances/Attendance days you can view all your working days with the hours that were registered.
  2. In Attendances/Manage Attendances/Balance history you can view your extra hours evolution
Try me on Runbot

Known issues / Roadmap

  • Improve leaves request to be able to specify how many hours it should deduct from the due hours

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

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



  • Compassion Switzerland


Other credits


  • Odoo Community Association: Icon.


This module is maintained by Compassion Switzerland.

Compassion Switzerland

Compassion Switzerland is a nonprofit organization whose mission is to release children from extreme poverty in Jesus name.

This module is part of the compassionCH/compassion-modules project on GitHub.

You are welcome to contribute.