Skip to content

[18.0][OU-ADD] hr_attendance: Nothing to do #5017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

BhaveshHeliconia
Copy link

No description provided.

@legalsylvain
Copy link
Contributor

legalsylvain commented May 12, 2025

/ocabot migration hr_attendance

Copy link
Contributor

@MiquelRForgeFlow MiquelRForgeFlow left a comment

Choose a reason for hiding this comment

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

You can have many hr.attendance records. Let's create this columns with openupgrade.add_columns() in pre-migration.

@@ -0,0 +1,29 @@
---Models in module 'hr_attendance'---
---Fields in module 'hr_attendance'---
hr_attendance / hr.attendance / expected_hours (float) : NEW isfunction: function, stored
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to precreate and fill with worked_hours - overtime_hours

hr_attendance / res.company / absence_management (boolean) : NEW hasdefault: default
hr_attendance / res.company / attendance_overtime_validation (selection): NEW selection_keys: ['by_manager', 'no_validation'], hasdefault: default
hr_attendance / res.company / auto_check_out (boolean) : NEW hasdefault: default
hr_attendance / res.company / auto_check_out_tolerance (float): NEW hasdefault: default
Copy link
Contributor

Choose a reason for hiding this comment

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

pre-create with default:

  • absence_management -> False
  • attendance_overtime_validation -> 'no_validation'
  • auto_check_out -> False
  • auto_check_out_tolerance -> 2

hr_attendance / hr.attendance / in_mode (selection) : selection_keys is now '['kiosk', 'manual', 'systray', 'technical']' ('['kiosk', 'manual', 'systray']')
hr_attendance / hr.attendance / out_mode (selection) : selection_keys is now '['auto_check_out', 'kiosk', 'manual', 'systray', 'technical']' ('['kiosk', 'manual', 'systray']')
hr_attendance / hr.attendance / overtime_status (selection) : NEW selection_keys: ['approved', 'refused', 'to_approve'], isfunction: function, stored
hr_attendance / hr.attendance / validated_overtime_hours (float): NEW hasdefault: compute
Copy link
Contributor

Choose a reason for hiding this comment

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

precreate overtime_status and fill it with approved
precreate validated_overtime_hours and fill it with overtime_hours

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

Successfully merging this pull request may close these issues.

4 participants