Friday, May 23, 2025
2 changes · 17.0
Resolved issues and error corrections
This fix prevents errors when an employee leave accrual is configured to carry over on the last day of a month such as February or April. The system now calculates the actual last day for the selected month and year, so leave allocations can be created reliably.
Original PR description
Steps to Reproduce: ----------------- 1) Create an Accrual - Set carryover_date to other - Set carryover_month to April. - Set carryover_day to Last Day. 2) Add an Accrual Rule to the accrual. 3)…
Steps to Reproduce: ----------------- 1) Create an Accrual - Set carryover_date to other - Set carryover_month to April. - Set carryover_day to Last Day. 2) Add an Accrual Rule to the accrual. 3) Create a Leave Allocation - Set allocation_type to Accrual. - Assign the Employee. - Define the Validity Period (date_from, date_to). **Issue:** ------------------- On accrual creation when the user selects the "last day" option for carryover_day, we are currently assigning the 31st as the day Hardcoding the 31st as the `carryover_day` can lead to errors when the `_get_carryover_date` method is triggered. For example, this causes failures in months with fewer days (e.g., February or April). **Fix:** ----------- evaluate the correct carryover_day based on the selected month & year when the value is set to last day, before using it to prepare the final date. This ensures that the last day of each month is accurately determined and applied. **Traceback:** ------------ ValueError: day is out of range for month **OPW:** 4792938 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed an issue where failed or deleted WhatsApp messages could show the default green status icon after deletion or data expiry. The message list now uses clearer color coding so users can better understand whether a WhatsApp message was sent, pending, failed, cancelled, or no longer available.
Original PR description
The failed WhatsApp message icon turns green after 15 days or once the message is deleted. PROBLEM: WhatsApp messages are deleted after 15 days, leading to data loss and causing the default green icon to be displayed. SOLUTION: Introduced `getWhatsappStatusClass` to display appropriate icons based on the message state: - Green icon for `sent`, `delivered`, `read`, and `received` states. - Orange icon for the `outgoing` state. - Red icon for the `error` and `cancel` states. - Grey icon for the `undefined` state (i.e., deleted WhatsApp message). Also introduced was `getWhatsappStatusTitle`, which returns the correct title based on the message state. Task-4481123