Monday, July 11, 2022
2 changes · master
Enhancements to existing features
This update restores clearer reporting for automated test results, making it easier for teams to monitor quality and spot problem areas. It also improves the accuracy of database activity measurements during tests, helping developers investigate performance issues more reliably without affecting end users.
Original PR description
Uses a dedicated logger (for easier filtering / silencing) for results output, and provides rough (module-level) stats in INFO but detailed (test-level) in DEBUG. Also modifies the global query counter (`odoo.sql_db.query_counter`) to update after each query rather than on close: with test cursors the actual underlying counter is only rarely flushed. This allows using the global query count to track query counts using tests, under the assumption that the tests themselves don't run concurrently. This is both much simpler and more precise than trying to find the current test's cursor and messing about with it, especially during the class setup phase.
Account setup was adjusted to avoid a conflict that could interfere with choosing the right account type. This makes creating accounts smoother and reduces the chance of confusing behavior for accounting users.
Original PR description
Needed for task 2888204 _onchange_user_type_id in account_disallowed_expenses overwrites _onchange_user_type_id in account_account. Renaming it to avoid that.