Tuesday, August 12, 2025
1 change · saas-18.3
Enhancements to existing features
This change streamlines internal balance sheet testing by avoiding repeated setup and cleanup of accounting entries. It should reduce test execution time without changing customer-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 Forward-Port-Of: odoo/enterprise#91640