Friday, February 21, 2025
4 changes · 17.0
Resolved issues and error corrections
This fix improves how accounting tests clean up temporary database work during test runs. It helps keep internal test transactions tidy and reduces the chance of lingering test state affecting later checks, with no expected change for end users.
Original PR description
The `rollback` decorator does not properly `release` its savepoint, leading to the subtransaction remaining present until the end of the current transaction (or a rollback to the start of the test). This is unlikely to trigger odoo/odoo#71395 but it's still bad form and unnecessary: an explicit `close` will *rollback and release* the savepoint, so `savepoin()` can just be wrapped into a `closing()` which will do that for us.
This update fixes an inaccurate internal description of what a base system lookup method returns. It helps developers avoid confusion when working with Odoo's core data references, with no expected impact on business users or daily operations.
Original PR description
Description of the issue/feature this PR addresses: from [this commit](https://github.com/odoo/odoo/pull/129029/commits/4a070832), the docstring of `_xmlid_lookup` incorrectly states that the method returns `(id, res_model, res_id)`, while in reality, it only returns `(res_model, res_id)`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where inserting a banner at the top of editable content could create an unwanted blank line and allow typing in the wrong place. The editor now uses an empty paragraph instead, making the banner placement cleaner and easier to adjust.
Original PR description
Before this commit and since [1], when inserting a banner at the top of the editable, a zero-width space (ZWS) was inserted before the banner to circuvent a Chromium bug that prevents fully selecting the banner with the mouse [2]. This led to the undesirable behavior of having a text node (with a ZWS) as the first child of the editable, creating a line above the banner and allowing for text insertion at the editable's root. This commit replaces the ZWS insertion with an empty paragraph, which can be later be moved around by the user. [1]: a0fcba6 [2]: https://issues.chromium.org/issues/40822311 Backport of PR #195027
This fix improves how internal database checkpoints are cleaned up in accounting tests and Gantt scheduling logic. It reduces the chance of leftover transaction state causing later errors, making these areas more reliable without changing user-facing workflows.
Original PR description
The `rollback` decorator of `account_acountant` does not properly `release` its savepoint, leading to the subtransaction remaining present until the end of the current transaction (or a rollback to the start of the test). This is unlikely to trigger odoo/odoo#71395 (though not impossible as one of the savepoints is in a test) but it's still bad form and unnecessary: an explicit `close` will *rollback and release* the savepoint, so `savepoin()` can just be wrapped into a `closing()` which will do that for us. For `web_gantt` the savepoint is closed but not on all paths (if `ValueError` is raised the savepoint is never rolled back let alone closed), the manual use is also rather unnecessary as we can just rollback around the relevant method call, none of the later mess interacts with the cursor / connection.