Skip to Content

Contributors

HR Attendance - Performance Issue in "Theoretical vs Attended Time Analysis"

Hello Contributors,

We are using the module hr_attendance_report_theoretical_time for checking our employees working time balance (extra or minus hours), but are facing performance issues (on Odoo 14 at the moment).

We’ve noticed that the report in the module can be slow, especially when handling a large number of attendances. In our setup, it computes all attendances since we started using the module, which significantly impacts performance.
While we sometimes need to analyze attendance over a limited period (e.g., the current year or semester), most of the time we need to retrieve the complete balance of an employee since their start date to assess total (=current) extra or missing hours.

Questions for the Community
  1. Have others experienced similar performance issues with this report?
  2. How do you optimize performance? Have you implemented any workarounds?
  3. Would there be interest in adding a mechanism to store computed balances at a pivot date to reduce the number of records processed?
  4. Do you use another method for computing the total extra hours of any employee? What is your approach?
Any insights or suggestions would be greatly appreciated!

Thanks,
Emanuel

by "Emanuel Cino" <emanuel@compassion.ch> - 11:20 - 3 Apr 2025

Follow-Ups

  • Re: HR Attendance - Performance Issue in "Theoretical vs Attended Time Analysis"
    I'm afraid the included feature in core is not taking into account missing attendance records, and as a note, the pointed extra module is not part of OCA.

    Regards.

    by Pedro M. Baeza - 12:07 - 3 Apr 2025
  • Re: HR Attendance - Performance Issue in "Theoretical vs Attended Time Analysis"
    Hi Janik,

    Thank you for this valuable answer! I will definitely check this in the newer versions.

    On Apr 3 2025, at 11:53 am, Janik von Rotz <notifications@odoo-community.org> wrote:
    Hey Emanuel

    The `hr_attendance_report_theoretical_time` functionality is part of Odoo 15 and newer. See "hr.attendance.overtime" model for reference

    I highly recommend you to upgrade your Odoo instance.

    To detect missing attendances there is https://www.odoo-wiki.org/hr-attendance-missing.html#hr-attendance-missing for Odoo 15 to 17. Missing attendances is supported by Odoo 18.

    Cheers, Janik

    On 4/3/25 11:22 AM, Emanuel Cino wrote:
    Hello Contributors,

    We are using the module hr_attendance_report_theoretical_time for checking our employees working time balance (extra or minus hours), but are facing performance issues (on Odoo 14 at the moment).

    We’ve noticed that the report in the module can be slow, especially when handling a large number of attendances. In our setup, it computes all attendances since we started using the module, which significantly impacts performance.
    While we sometimes need to analyze attendance over a limited period (e.g., the current year or semester), most of the time we need to retrieve the complete balance of an employee since their start date to assess total (=current) extra or missing hours.

    Questions for the Community
    1. Have others experienced similar performance issues with this report?
    2. How do you optimize performance? Have you implemented any workarounds?
    3. Would there be interest in adding a mechanism to store computed balances at a pivot date to reduce the number of records processed?
    4. Do you use another method for computing the total extra hours of any employee? What is your approach?
    Any insights or suggestions would be greatly appreciated!

    Thanks,
    Emanuel
    -- 
    Suggest a meeting: https://apmt.day/janikvonrotz/999120f2/
    We are hiring: https://www.mint-system.ch/jobs

    CTO Mint System GmbH
    Tel: +41 44 244 7222
    _______________________________________________
    Post to: mailto:contributors@odoo-community.org

    by "Emanuel Cino" <emanuel@compassion.ch> - 12:01 - 3 Apr 2025
  • Re: HR Attendance - Performance Issue in "Theoretical vs Attended Time Analysis"

    Hey Emanuel

    The `hr_attendance_report_theoretical_time` functionality is part of Odoo 15 and newer. See "hr.attendance.overtime" model for reference

    I highly recommend you to upgrade your Odoo instance.

    To detect missing attendances there is https://www.odoo-wiki.org/hr-attendance-missing.html#hr-attendance-missing for Odoo 15 to 17. Missing attendances is supported by Odoo 18.

    Cheers, Janik

    On 4/3/25 11:22 AM, Emanuel Cino wrote:
    Hello Contributors,

    We are using the module hr_attendance_report_theoretical_time for checking our employees working time balance (extra or minus hours), but are facing performance issues (on Odoo 14 at the moment).

    We’ve noticed that the report in the module can be slow, especially when handling a large number of attendances. In our setup, it computes all attendances since we started using the module, which significantly impacts performance.
    While we sometimes need to analyze attendance over a limited period (e.g., the current year or semester), most of the time we need to retrieve the complete balance of an employee since their start date to assess total (=current) extra or missing hours.

    Questions for the Community
    1. Have others experienced similar performance issues with this report?
    2. How do you optimize performance? Have you implemented any workarounds?
    3. Would there be interest in adding a mechanism to store computed balances at a pivot date to reduce the number of records processed?
    4. Do you use another method for computing the total extra hours of any employee? What is your approach?
    Any insights or suggestions would be greatly appreciated!

    Thanks,
    Emanuel

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    -- 
    Suggest a meeting: https://apmt.day/janikvonrotz/999120f2/
    We are hiring: https://www.mint-system.ch/jobs
    
    CTO Mint System GmbH 
    Tel: +41 44 244 7222

    by Janik von Rotz - 11:51 - 3 Apr 2025
  • Re: HR Attendance - Performance Issue in "Theoretical vs Attended Time Analysis"
    You can start a new thread here for that question: "Hey, how do you compute extra hours on your side?" for getting a general conversation, but having a thread titled "HR Attendance - Performance Issue in "Theoretical vs Attended Time Analysis"" won't attract people that may be able to answer you and it will be misleading when doing searches.

    Regards.

    by Pedro M. Baeza - 11:51 - 3 Apr 2025
  • Re: HR Attendance - Performance Issue in "Theoretical vs Attended Time Analysis"
    Hi Pedro,

    Got it, that makes sense. I’ll continue the technical discussion directly in the issue. However, I’m still interested in the fourth question from my message, as it’s not directly related—I'd like to explore if there are alternative ways to achieve the same functionality.

    Thanks for the clarification!

    Best,
    Emanuel

    by "Emanuel Cino" <emanuel@compassion.ch> - 11:46 - 3 Apr 2025