Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Overtime calculation in Odoo 15 and OCA

by
Pierre Verkest
- 06/08/2023 14:07:55

Hello Florian,

Thank you for sharing your observations and concerns regarding the overtime calculation in Odoo 15.0. It's great to see the community actively working on improving the functionality.

I wanted to let you know that during the OCA Days 2022, I presented our usage of the modules hr_attendance_validation and hr_attendance_overtime. You can find the presentation at this link: OCA Days 2022 Presentation. In this presentation, I discussed how these modules have been beneficial to us and our approach to managing attendance and overtime calculations.

I am aware that Odoo has introduced a new model (hr.attendance.overtime) and mechanisms for overtime calculation in version 15.0, but it appears to have some inconsistencies and issues that need to be addressed. I'm glad to hear that you are planning to look into it further, and I'm also interested in exploring the changes Odoo has made to the overtime concept in 15.0 and beyond.

As of now, I'm not aware of anyone else in the community currently working on the same topic, but I'm eager to collaborate and share information and experiences on overtime in Odoo 15.0 onwards when the time comes in early 2025.

As of now, I want to emphasize that I have definite plans to delve into and address the subject of overtime in Odoo 15.0 early in 2025. While I'm not aware of anyone else in the community currently working on the same topic, I am eagerly looking forward to collaborating with others, sharing information, and exchanging experiences regarding overtime in Odoo 15.0 and beyond when the time arrives in early 2025. Could it be a topic at OCA days 2023 ?

Best regards,


Le ven. 28 juil. 2023 à 13:52, Florian Kantelberg <notifications@odoo-community.org> a écrit :

Hello community,

we are currently looking on overtime calculation in Odoo 15.0. Odoo 15.0 introduced a new model (hr.attendance.overtime) and mechanisms for an overtime calculation. First I want to share our knowledge with digging into it. There are currently some core bugs with the overtime calculation:

  • The resource.calendar from hr.contract is not used for overtime calculation as you would expect if hr_attendance and hr_contract is installed. Causes wrong calculations if you edit attendance before a resource calendar (e.g. somebody forgot to logout and you are validating the attendance)
  • Overtime ignores dates without attendance completly despite it's an actual working day. E.g. if you have to work for 8h and login for 1min you have -7:59h overtime. If you don't login it's +/-0h. This isn't fully consistent.

We are currently trying to develop fixes for these core bugs. The bugs are present from 15.0 to master. We can share the PRs when they are ready.

Following are additional observations regarding the state of the OCA modules in regard to overtime and attendance:

  •  hr_attendance_sheet and hr_attendance_validation: (up to 14.0)
    •  There is a big intersection in the feature sets of both modules. Both are creating a kind of sheet and a multiple step process to verify/approve attendances. They also add features like overtime calculation etc. based on the sheets.
    • A simple migration PR[1] is maybe not worth it because of the core changes in the overtime calculation. E.g. if an approval process is needed shouldn't only approved attendances count towards your overtime?
  • hr_holidays_public: (already 15.0)
    • This module works fine especially the automatic holiday generation with the modules built on top. The module has problems in the overtime calculation. The holidays reduce the days when you request additional holidays. But such a holiday is getting ignored for the overtime calculation. E.g. if you work on a holiday for 9h instead of the regular 8h you get 1h overtime with OCA holiday but 9h for core holiday. It's also not possible to use half holidays (e.g. the 24.12. or 31.12. in Germany). The module also ignores the holidays of the Odoo core. Are there any reasons to stick to the extra model we are not seeing?
    • In 15.0 Odoo core has a own model for public holidays. So just going on we community solution might result in a growing divergence from the core. The feature to generate public holidays is still very comfortable. A new approach could be to rebuild this to create entries of Odoo core model.
  • hr_attendance_report_theoretical_time
    • Here a intersection to the Odoo core overtime calculation in Odoo 15.0 exists, since it comes with some reports (pivot tables).


Is currently somebody else working on it and can share information or experience with overtime in Odoo 15.0 onwards?

Best Regards,

Florian

[1] https://github.com/OCA/hr-attendance/pull/114

-- 
Mit freundlichen Grüßen

Florian Kantelberg
Softwareentwickler

initOS GmbH
Innungsstraße 7
21244 Buchholz i.d.N.

Tel.: +49 (0) 4181 1350344
Fax: +49 (0) 4181 1350310

Email: florian.kantelberg@initos.com
Internet: https://www.initos.com

Geschäftsführung:
Dr.-Ing. Frederik Kramer & Dipl.-Ing. (FH) Torsten Francke

Sitz der Gesellschaft: Buchholz i.d.N.
Amtsgericht: Tostedt, HRB 205226
USt-IdNr: DE 815580155
Steuer-Nr: 15/200/53247

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

Reference