Sunday, July 13, 2025
3 changes · saas-18.3
Enhancements to existing features
This change updates internal test exceptions for several localization modules so they no longer repeatedly fail a developer-only validation. It does not change customer-facing behavior, but helps keep maintenance and release checks cleaner for country-specific features.
Original PR description
Most l10n modules are only installed during the standalone l10n job, which does not run `test_uncommented_invisible_field`. As a result they fail the test in every version where it was introduced. - sort the whitelisted modules - add the l10n that currently fail, as we don't want to fix them - revert change adding a bunch of comments in views
Resolved issues and error corrections
This fixes intermittent failures in automated stock quantity report tests that could happen around midnight. It keeps test timing consistent, improving confidence in release validation without changing user-facing inventory behavior.
Original PR description
The tests: - `test_report_stock_quantity` - `test_report_stock_quantity_with_product_qty_filter` can fail if the test class was instantiate at midnight and the tests launched at 00:01. The issue has…
The tests: - `test_report_stock_quantity` - `test_report_stock_quantity_with_product_qty_filter` can fail if the test class was instantiate at midnight and the tests launched at 00:01. The issue has been explained extensively in d1e11dc2b41e66709ddd89beded32872af4118b9 Here is a modest retranscription of its holy analysis: The Test class `TestReportStockQuantity` inherit from `TransactionCase`. So, once initialized, a SQL transaction is started and is the same for all the tests of the class: https://github.com/odoo/odoo/blob/d86409d93e096126b32cbb35f442db332628375d/odoo/tests/common.py#L775-L778 Also, in a SQL request, the method `now()` does not really return the current date: > Notice that NOW() and its related functions return the start time of the current transaction. In other words, the return values of the function calls are the same within a transaction. (https://www.postgresqltutorial.com/postgresql-date-functions/postgresql-now/) So, if we we start all the tests of the class `TestReportStockQuantity` at the end of D01. The SQL transaction is created and the tests are executed one by one with a NOW() corresponding to D01. However, certain indiviual tests might be launched on the following day D02 because it takes time to run the rest of the tests of the class: In particular, the python "today()" will notgive the same date as the SQL NOW and the queries of the test will simply not perform the expected. E.g: https://github.com/odoo/odoo/blob/d86409d93e096126b32cbb35f442db332628375d/addons/stock/tests/test_report_stock_quantity.py#L105-L110 runbot-226726 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#216984 Forward-Port-Of: odoo/odoo#215424
This change reverses a previous broad update that was creating repeated conflicts during forward ports without preventing future errors. The project will instead handle the issue through targeted test whitelisting, reducing maintenance friction with minimal business impact.
Original PR description
Change is noisy, conflicts on every forward port, and doesn't preclude adding more errors. Whitelist on the test side instead.