Monday, March 2, 2026
2 changes · master
New functionality added to Odoo
This update adds flexibility to how Labour Welfare Fund (LWF) deductions are handled in employee payroll. Businesses can now choose between monthly, half-yearly, or yearly cycles for LWF deductions, aligning with employee contracts. This improves payroll accuracy and reporting for companies operating in Russia.
Original PR description
- Introduced the Deduction Cycle option under Labour Welfare Fund (LWF) settings in employee payroll. - Default cycle set to monthly, with options for half-yearly and yearly. - Updated LWF salary rule: follow the selected deduction cycle from the employee contract. - Adjusted deduction logic to handle monthly, half-yearly (June & December), and yearly (December) cycles. task-4222503
This update introduces the ability for employees in Saudi Arabia to receive advance payments for their annual leave, specifically when leave overlaps multiple months. This feature simplifies payroll processing by allowing employees to be paid in advance for upcoming leave periods, improving cash flow management. The system tracks advance payments and recoveries through salary inputs, ensuring accurate payroll calculations.
Original PR description
This commit introduces a new feature in the Saudi Arabian HR Payroll module that allows employees to receive advance payments for their leave days. The most basic use case is an employee who takes a…
This commit introduces a new feature in the Saudi Arabian HR Payroll module that allows employees to receive advance payments for their leave days. The most basic use case is an employee who takes a leave that overlaps two months and wants to be paid in advance for the leave days that fall in the following month. The feature works only for validated leaves of the Annual Leave time-off type, as configured in the settings. The feature can be described in three main parts: 1. A button in the `hr.leave` form view that opens a wizard to process the leave advance payment. The action checks whether it is accessed from the SA Payroll module, whether the leave is validated, whether the leave overlaps more than one month, and whether the user has the required permissions. 2. A wizard `hr.leave.advance.pay` that allows the user to select the salary structure to be used for the advance payment. The wizard calculates the advance amount based on the number of leave days that fall in the next months and creates or updates a valid payslip accordingly. A valid payslip is defined as one that is in draft state, belongs to the selected structure and version, and covers the next month period without duplicates. 3. A leave advance and recovery payment system that's represented by two salary inputs (`LEAVEADVPAY` and `LEAVERECPAY`) that are populated on the payslip. `LEAVEADVPAY` is populated by the wizard and has no constraints on the number of days it can be paid in advance while `LEAVERECPAY` is populated automatically based on the number of leave days that have been paid in advance in the previous payslip(s) and has a constraint that it cannot exceed the number of days paid in advance or the sum of the number of worked days and the number of annual leave days for that period. Leaves have no direct relationship with payslips, meaning that deleting leave does not affect the populated salary inputs on the payslip. The only interaction between leaves and payslips occurs through this wizard, which reports the leave day count on the payslip. It is important to highlight that in this feature, the order of creating payslips and validating them matters. Meaning that `LEAVERECPAY` is populated based on the order of creating payslips, so the user is expected to create payslips in their correct chronological order and validate them in the same order as well. The fact that the leave advance and recovery payment system deals with the number of leave days paid in advance, rather than the actual amount paid, is an intentional design choice to enhance the traceability and understanding of the payslips. This way, the user can easily track how many leave days have been paid in advance and recovered without having to reverse-calculate the amount based on the salary rules. Also, it's assumed that an employee should not have multiple versions with different wages occurring between a leave advance payment and a recovery payment, as this would affect the consistency between the advance and recovery monetary amounts. task-5186909