Wednesday, May 14, 2025
2 changes · master
Enhancements to existing features
Financial report formulas can now round values more flexibly, including to tens or hundreds and with selectable rounding methods. Conditional report calculations also handle zero values correctly, helping avoid inaccurate results when checking thresholds.
Original PR description
==== Improve the round() subformula of the aggregation engine in two ways: Add support for negative precision, similarly to how python's round() works. Providing a negative precision will round to…
==== Improve the round() subformula of the aggregation engine in two ways: Add support for negative precision, similarly to how python's round() works. Providing a negative precision will round to the nearest 10/100/... Also add support for providing the rounding method, defaulting to 'HALF-DOWN' similarly to how it works today. These options can be mixed together to increase by a lot the rounding possibilities. ==== Take the use case of three expressions: A: simple expression with a result of 2500 B: simple expression with a result of 0 C: aggregation for which we want to get the value of A only if B is below 50 This will not work, because _aggregation_apply_bounds will return the unbound_value and cast it to a bool then int to get the multiplier. If the unbound value is 0, it will set the result to 0 even though 0 is indeed below 50. We now return "None" from _aggregation_apply_bounds when the value is out of bound instead of 0, to remove any possible confusion.
Colombian withholding reports have been reorganized to show clearer descriptions, better grouping, and an added concept column for ICA reports. This makes Fuente and ICA reporting easier to review and helps ensure report figures are based on the correct local tax codes.
Original PR description
- Adding 'concepto' column to ICA reports, using automatically filled account_move_line.name for it. - Applying proper grouping descriptions for Fuente reports by tax type rather than accounts. - Adjusting withholding tax domains to be by l10n-specific codes rather than account used. - Separating Fuente and ICA in cert~templates.xml because there is no reason for them to be confusingly together. - Adjusting 'if bimestre' and 'if account' logic to 'if expanded' to properly reflect what it is doing and apply to the new columns as well. - Adjusting how empty columns are handled to allow labels to correctly show up when not expanded. - Adding tests for the adjusted reports. task-4315210