Tuesday, August 12, 2025
1 change · saas-18.2
Enhancements to existing features
The accounting reports test setup now avoids repeatedly switching the same accounting entries back and forth during balance sheet checks. This reduces unnecessary processing in automated tests, helping validation run more efficiently without changing user-facing accounting behavior.
Original PR description
In `test_balance_sheet_balanced`, during the balance test the case first sets a bunch of lines to `posted`, then sets them (back?) to `draft`. However this is done per report, even though in the default mode the amls involved don't change between reports. Not only that, but since f2100c2654a068fe197025aecc605fdada3a919a each CoA's test case is within a savepoint, so the AMLs get reverted implicitly. Hence rejigger the thing to activate the relevant AMLs while setting up localization if not in `IDENTIFY_INCORRECT_ACCOUNTS` mode, that way we don't even pay for the activation, let alone do so repeatedly for each report we test. Backport of odoo/enterprise#88485