Open ChristophAbenthungCibex opened 3 months ago
The current validation mechanism for time-off requests works as expected when creating new requests, ensuring that the time-off period falls within the allocated date range and does not exceed the allocated days. However, when editing an existing, previously approved time-off request, the system bypasses the validation process, allowing the user to save changes that violate the allocation rules.
As mentioned by @ChristophAbenthungCibex
When creating a new time-off request that exceeds the allocation days or falls outside the allocation date range, the system correctly throws a validation error: "Validation Error: There is no valid allocation to cover that request."
However, this validation is skipped when editing a previously approved time-off request. This allows users to modify past requests in a way that bypasses the allocation limits.
Odoo Version
Steps to Reproduce
Steps to Reproduce:
Expected behavior An error gets thrown because the employee has no allocation for 05/02/2024
Actual behavior The leave is valid and the employee can take the leave
Log Output
No response
Support Ticket
No response