Skip to content

[16.0][OU-ADD] hr_holidays - #3913

Closed
remytms wants to merge 1 commit into
OCA:16.0from
coopiteasy:16-add-hr_holidays
Closed

[16.0][OU-ADD] hr_holidays#3913
remytms wants to merge 1 commit into
OCA:16.0from
coopiteasy:16-add-hr_holidays

Conversation

@remytms

@remytms remytms commented Jun 13, 2023

Copy link
Copy Markdown

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

pedrobaeza commented Jun 13, 2023

Copy link
Copy Markdown
Member

/ocabot migration hr_holidays

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jun 13, 2023
Comment thread openupgrade_scripts/scripts/hr_holidays/16.0.1.5/post-migration.py Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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