Repository navigation
Conversation
- hr.leave.type is merged into hr.work.entry.type: move pre_approved_instance and its form view there. - hr.leave.holiday_status_id is now work_entry_type_id. - Drop request_unit_half/request_unit_hours, removed in 20.0. - supported_attachment_ids is only in the dashboard form in 20.0: move the visibility override there. - Allocation multi wizard: follow the 20.0 core method, still without the automatic approval. - Add tests for month split, pre-approved flow, allocation reset and the multi allocation wizard.
Contributor
… final approval - Move the pre-approval logic from action_approve/action_validate to _action_validate. action_validate does not exist in the core, so that override never ran, and action_approve did not pass check_state and failed when approving several leaves at once. - Pre-approved leaves are validated with skip_time_rules; time rules run in action_post_approve, after the resource leaves exist. - Anchor the attachment xpath on the div that wraps the field in 20.0. - Regenerate i18n (references to hr.work.entry.type) and translate the empty terms. - README: real configuration and usage, drop the runbot badge.
…oard form The PO chose the 20.0 behavior: in Pre-Approved the supporting document is attached through the chatter, which already counts as a supported attachment and shows the Approve button. The form keeps the core rule (attachment field only while the leave is To Approve).
Contributor
|
@roboadhoc r+ nobump rebase-ff |
Contributor
|
Merge method set to rebase and fast-forward. |
roboadhoc
pushed a commit
that referenced
this pull request
Oct 16, 2026
- hr.leave.type is merged into hr.work.entry.type: move pre_approved_instance and its form view there. - hr.leave.holiday_status_id is now work_entry_type_id. - Drop request_unit_half/request_unit_hours, removed in 20.0. - supported_attachment_ids is only in the dashboard form in 20.0: move the visibility override there. - Allocation multi wizard: follow the 20.0 core method, still without the automatic approval. - Add tests for month split, pre-approved flow, allocation reset and the multi allocation wizard. Part-of: #73 Signed-off-by: Juan Carreras <[email protected]>
roboadhoc
pushed a commit
that referenced
this pull request
Oct 16, 2026
… final approval - Move the pre-approval logic from action_approve/action_validate to _action_validate. action_validate does not exist in the core, so that override never ran, and action_approve did not pass check_state and failed when approving several leaves at once. - Pre-approved leaves are validated with skip_time_rules; time rules run in action_post_approve, after the resource leaves exist. - Anchor the attachment xpath on the div that wraps the field in 20.0. - Regenerate i18n (references to hr.work.entry.type) and translate the empty terms. - README: real configuration and usage, drop the runbot badge. Part-of: #73 Signed-off-by: Juan Carreras <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Tarea: https://www.adhoc.inc/odoo/project.task/76763
What changes
hr.leave.typeis merged intohr.work.entry.typein 20.0:pre_approved_instanceand its form view move there (inheritshr_holidays.hr_work_entry_type_view_form).hr.leave.holiday_status_idis nowwork_entry_type_id.request_unit_half/request_unit_hourswere removed in 20.0: dropped from the fields copied on split._action_validate, the only core path that validates a leave. The oldaction_validateoverride never ran (the core has no such method) andaction_approvefailed on more than one leave.skip_time_rules; the rules run inaction_post_approve, after the resource leave exists.pre-validate: the 20.0 behavior is kept (product decision). The document is attached through the chatter, which counts as a supported attachment and shows the Approve button. No view override for the attachment field._get_employees_from_allocation_modewas removed, new accrual init), still without the automatic approval. With a duration set, accrual is no longer processed on creation (same as core 20.0; the 19.0 override always processed it).Data
No migration script. The only production database with the module has no time off type with
pre_approved_instanceset and no leave inpre-validate, so there is nothing to carry over. To be revisited if a real case appears.Open points
action_post_approvecalls_validate_leave_request()again after the pre-approval already did it (same as 19.0). To review apart from this migration.Test plan
--test-tags /hr_holidays_ux:0 failed, 0 error(s) of 13 tests; the new tests fail with the previous code.pre-commitpasses.upgrade_codescripts: none applies to this module.