- Mailing Lists
- Contributors
- Re: Overtime calculation in Odoo 15 and OCA
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
Re: Overtime calculation in Odoo 15 and OCA
Hi Florian
I think I resolved some issues with custom modules and actions. I
assume you speak/read German.
Regarding hr_holidays_public have look at https://www.odoo-wiki.org/best-practice-working-times-and-holiday-allocations.html
Regarding hr_attendance_report_theoretical_time we have this alternative https://www.odoo-wiki.org/hr-employee-attendance-report.html
Regarding "Overtime ignores dates without attendance completly
despite it's an actual working day." we created this:
https://www.odoo-wiki.org/hr-attendance-actions.html#fehlende-anwesenheitseintrage-anzeigen
Cheers, Janik
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
by Janik von Rotz - 04:16 - 28 Jul 2023
Reference
-
Overtime calculation in Odoo 15 and OCA
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
by Florian Kantelberg - 01:50 - 28 Jul 2023