Skip to content
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

[16.0][OU-ADD] hr_holidays #3913

Closed
wants to merge 1 commit into from
Closed

Conversation

remytms
Copy link
Contributor

@remytms remytms commented Jun 13, 2023

Compute new values for allocation_validation_type on hr.leave.type as it is now a stored computed field with only two choices: "no" and "officer".

Load noupdate_changes.

@pedrobaeza
Copy link
Member

pedrobaeza commented Jun 13, 2023

/ocabot migration hr_holidays

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jun 13, 2023
Compute new values for allocation_validation_type on hr.leave.type as it is now
a stored computed field with only two choices: "no" and "officer".

Load noupdate_changes.
It set "no" by default except if employee_request is set to "no"
where it set "officer".
"""
openupgrade.logged_query(
Copy link
Member

Choose a reason for hiding this comment

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

You only need to reallocate those with set value to the corresponding one. Please don't write the rest that are OK.

Copy link
Member

Choose a reason for hiding this comment

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

As further explanation, imagine there's an extra module adding a new validation type. You are overwriting the leave types with this new validation type in this SQL.

@pedrobaeza
Copy link
Member

Superseded by #4335 correcting the SQL query about allocation_validation_type, and also doing the annotation in the coverage file, so the migration scripts are also tested.

@pedrobaeza pedrobaeza closed this Mar 8, 2024
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.

5 participants