Skip to content

Conversation

petrus-v
Copy link
Contributor

@petrus-v petrus-v commented Apr 29, 2025

  • migrate backend stuff:
    As the new hr.attendance.overtime we use it as standard backend to store adjustement hours.
    this gives the opportunity to configure on employee if it compute compensatory hours are weekly or daily base. For daily base this is the Odoo standard so it's out of the scope of the weekly validation.

  • allow negative compensatory hours (this should probably extract in an independent module (I'll add it in the roadmap)

  • make sure readme is updated

  • migrate frontend source code to the used from attendance widget

petrus-v and others added 17 commits April 15, 2025 09:45
This module allow to review attendance per weeks
and generate proper compensatory hours

And apply suggestions from code review

Co-authored-by: aleuffre <[email protected]>
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-attendance-14.0/hr-attendance-14.0-hr_attendance_validation
Translate-URL: https://translation.odoo-community.org/projects/hr-attendance-14-0/hr-attendance-14-0-hr_attendance_validation/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-attendance-14.0/hr-attendance-14.0-hr_attendance_validation
Translate-URL: https://translation.odoo-community.org/projects/hr-attendance-14-0/hr-attendance-14-0-hr_attendance_validation/
Currently translated at 100.0% (85 of 85 strings)

Translation: hr-attendance-14.0/hr-attendance-14.0-hr_attendance_validation
Translate-URL: https://translation.odoo-community.org/projects/hr-attendance-14-0/hr-attendance-14-0-hr_attendance_validation/it/
Currently translated at 100.0% (85 of 85 strings)

Translation: hr-attendance-14.0/hr-attendance-14.0-hr_attendance_validation
Translate-URL: https://translation.odoo-community.org/projects/hr-attendance-14-0/hr-attendance-14-0-hr_attendance_validation/it/
we are using hr.leaves to manage allowed remote days but we
don't want to remove thoses times in attendance validation
Currently translated at 100.0% (87 of 87 strings)

Translation: hr-attendance-14.0/hr-attendance-14.0-hr_attendance_validation
Translate-URL: https://translation.odoo-community.org/projects/hr-attendance-14-0/hr-attendance-14-0-hr_attendance_validation/it/
…ue for analysis purpose

* store existing fields to be used in pivot view
* add new field to report compensatory leaves taken
Use start/end validation sheet dates to compute theorical time taking care
of bank holidays
* hr_holidays_public: fix calendar.get_work_hours_count
* hr_attendance_overtime: standard migration
* hr_attendance_modification_tracking: standard migration
@petrus-v petrus-v force-pushed the 17.0-mig-hr_attendance_validation branch 3 times, most recently from df306b0 to 683fcfd Compare May 6, 2025 07:39
@petrus-v petrus-v force-pushed the 17.0-mig-hr_attendance_validation branch from 683fcfd to 274b272 Compare May 6, 2025 13:11
Compensatory Allocation and adjustement hours now
rely on Odoo standard hr.attendance.overtime
@petrus-v petrus-v force-pushed the 17.0-mig-hr_attendance_validation branch from 274b272 to 12235e0 Compare May 6, 2025 13:36
Comment on lines +352 to +362
record.adjustment_overtime_id = self.env[
"hr.attendance.overtime"
].create(
{
"employee_id": record.employee_id.id,
"date": record.date_to,
"duration": duration,
"duration_real": duration,
"adjustment": True,
}
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum... bypassing hr.leave.allocation and hr.leave is breaking hr.leave.report so probably better to re-add them to be able:

  • properly display report
  • be able to create different leave.type per year

As far I remember I've chosen to create those line directly to avoid constraints on hr.leave which is hard to guess, I'll have to find a way to avoid those constraints.

The other approach would be to change the hr.leave.allocation request 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hum using odoo 17.0 without this module we are getting the same issue, accrued compensatory hours are not displayed. it's probably better to create a dedicated module or create a PR against Odoo 🤔

<field name="sequence">4</field>
</record> -->

</odoo>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be removed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants