Sunday, July 27, 2025
3 changes · saas-18.3
Resolved issues and error corrections
Very small negative amounts that round to zero now display as positive zero, such as "0.00" instead of "-0.00". This avoids confusing or misleading values in documents, tax calculations, and user-facing number displays.
Original PR description
float_repr(-0.00000001, 2)
formatFloat(-0.00000001, { digits: [16, 2] })
Before: "-0.00"
After: "0.00"
opw-4685953
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#219913This fix makes Odoo's internal test time-freezing tool behave predictably instead of switching state unexpectedly when called without details. It reduces the risk of confusing or unreliable automated tests, helping developers catch issues more consistently before release.
Original PR description
The freezeTime utility function had a very strange behaviour: if it is called without an argument, it would toggle the current value. This means that if i read a test that calls freezeTime, i actually do not know if the time is frozen after that function call. This could be a problem in many subtle situations. For example, if a test is using freezeTime, and then later, someone add a `beforeEach(freezeTime)` in that suite without removing the existing freezeTime, then weirdly, the test would no longer be "protected". This commit simplifies the behaviour of freezeTime to make sure we know what we are doing in all cases. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#220536
Very small negative amounts in Luxembourg reporting are now shown as zero when rounded to two decimals. This prevents confusing values like "-0.00" from appearing in report output and improves clarity for users reviewing financial figures.
Original PR description
float_repr(-0.00000001, 2)
formatFloat(-0.00000001, { digits: [16, 2] })
Before: "-0.00"
After: "0.00"
opw-4685953
Forward-Port-Of: odoo/enterprise#90992