Daily updates from Odoo
Tuesday, July 21, 2026
1 change · 18.0
Resolved issues and error corrections
Fixed an issue where salary attachment payments could include unrelated deduction lines when payslips were marked as paid. This prevents overstated attachment payments and helps ensure payroll deductions are recorded accurately.
Original PR description
Since deduction_codes is a unique grouping key generated from other_input_type_id.code, it always represents a single salary rule code. The salary attachment payment logic previously matched payslip…
Since deduction_codes is a unique grouping key generated from other_input_type_id.code, it always represents a single salary rule code. The salary attachment payment logic previously matched payslip lines using: r.code in deduction_codes This expression checks whether the value of r.code is a substring of 'deduction_codes'. As a result, it could incorrectly match unrelated salary rule codes. For example: ATD → Authority To Deduct TD → Total Deduction Since "TD" in "ATD" evaluates to True, both payslip lines could be included in the calculation. Consequently, the paid amount of a salary attachment could incorrectly include amounts from unrelated payslip lines, leading to an overstated payment amount. This commit replaces the substring comparison with an exact code comparison, ensuring that only the payslip line corresponding to the salary attachment's input type is considered when recording payments. Runbot v18.0 image: [bug image](https://drive.google.com/file/d/1paT6SVadiMd-QicuXGsW_gjl3XRzLhuI/view?usp=sharing) opw-6310159