Monday, July 21, 2025
1 change · saas-18.2
Resolved issues and error corrections
Employees in Indian companies can now open their approved time off requests without triggering an access error. The fix avoids changing a leave-related field after the request has already been approved, preserving the correct workflow permissions.
Original PR description
**Steps to reproduce:** 1. Install l10n_in_hr_holidays and l10n_in 2. Switch to IN company 3. Create an employee related to Marc Demo in IN Company 4. Log in with Marc Demo and create a timeoff 5. Approve the timeoff by Mitchel admin 6. Open the form view of approved timeoff by Marc Demo **Issue:** - The _get_durations method in l10n_in_hr_holidays attempts to update the l10n_in_contains_sandwich_leaves field whenever it runs, including when opening the form view of an approved time off. This causes an access error, as updates are not allowed for Marc demo in the approved state. **Solution:** - Added a state check in the _get_durations method to prevent updating the field for approved records. opw-4741162 Forward-Port-Of: odoo/odoo#209233