Saturday, February 22, 2025
2 changes · 17.0
Enhancements to existing features
This update replaces several custom database savepoint patterns with a shared helper, reducing the chance of inconsistent behavior and making maintenance easier. It is an internal cleanup with no expected change to day-to-day user workflows.
Original PR description
Avoids inconsistencies, simplifies control flow sometimes. Not all manual savepoints are converted: - The implementation details of `Savepoint` can't exactly be converted. - The test case savepoint is difficult to convert as the savepoint name / id is "leaked" for historical reasons, but also `test_mail_bounce_during_send` does exceedingly strange stuff and needs to re-create the test savepoint because it commits multiple times...
This update replaces a low-level database checkpoint pattern with a standard helper in affected Odoo flows. It reduces maintenance risk and keeps behavior stable for users by avoiding unnecessary changes to data flushing.
Original PR description
They're not in loop (that I can see) so are unlikely to trigger odoo/odoo#71395, but the use of manual savepoint seems unwarranted. Using non-flushing savepoint to avoid risks of behaviour change.