Skip to content
Snippets Groups Projects
Commit 66b65074 authored by Tommy (tong)'s avatar Tommy (tong)
Browse files

[FIX] hr_work_entry_contract: missing leave_id record on some work entries


Steps to reproduce:

- Add a pubic holiday record, i.e., From 6 Feb 2023 to 7 Feb 2023
- Add a leave with the date conflicting the public holiday, i.e. From
3 Feb 2023 to 8 Feb 2023
- Regenrate the work entries and check the work entry in form view.

Current behaviour:
Missing leave_id on some work entries

Expected behaviour:
It should linked to the corresponding leave for the work entries that is
created by the leave, while public holiday work entries should keep leave_id
empty.

Explanation:

After calling contract._get_interval_leave_work_entry_type, the leaves should
be filted out the not related leaves so contract._get_more_vals_leave_interval
can get the correct vals. Otherwise public holiday will always return
{'leave_id': false} in contract._get_more_vals_leave_interval which will replace
the correct leave_id value.

closes odoo/odoo#112066

X-original-commit: 78801858
Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent 136ba771
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment