odoo/odoo#121533
Created by Tom De Caluwé (tdc)
Merged
at a1dffd3f44e81289cbd67174bb094326a5df505d
- label
- odoo-dev:14.0-hr_holidays-indeterministic_test-tdc
- head
- 38446ef414e9f05a591c196e37e12fba990ab71e
- target
- 14.0
- merged
- 1 year ago by Kevin Baptiste
- forward-ports
- odoo/odoo#122839 targeting 16.0
- odoo/odoo#122832 targeting saas-15.2
- odoo/odoo#122826 targeting 15.0
[FIX] hr_holidays: make test_current_leave_status deterministic
The `test_current_leave_status` checks the correct implementation of different `hr.leave` computed fields. To do this, a leave is created, during the test. The test fails however, when the employee is not supposed to work during the leave period, which can happen when running the test on certain days. The test is made deterministic again by adding the `number_of_days` field to the dict. As this is a stored field, the created leave entry will be considered valid.
Closes odoo/odoo#119591