Friday, February 21, 2025
11 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.
Miscellaneous changes
Add "(copy)" to the name of the duplicated payment term. task-4227445 Forward-Port-Of: odoo/odoo#197605
Original PR description
Add "(copy)" to the name of the duplicated payment term. task-4227445 Forward-Port-Of: odoo/odoo#197605
Steps to Reproduce: 1. Drop a popup snippet on any page (e.g., Home page). 2. In the editor, set "Shown on" to "This Page." 3. Save the snippet for reuse. 4. Drop the same custom snippet on another page (e.g., Contact Us page). 5. Try to make the snippet visible on this page. Issue: The user has to click twice to make the popup visible. On the first click, a scroller appears, and the popup becomes visible only on the second click. The reason behind is that at the time of saving snippe
Original PR description
Steps to Reproduce: 1. Drop a popup snippet on any page (e.g., Home page). 2. In the editor, set "Shown on" to "This Page." 3. Save the snippet for reuse. 4. Drop the same custom snippet on another page (e.g., Contact Us page). 5. Try to make the snippet visible on this page. Issue: The user has to click twice to make the popup visible. On the first click, a scroller appears, and the popup becomes visible only on the second click. The reason behind is that at the time of saving snippet for later use, it clones it with `d-none` class. This commit resolves the issue by explicitly removing the `d-none` from the custom_popup_snippet, ensuring the custom popup appears immediately after being dragged and dropped. task-4088420 Forward-Port-Of: odoo/odoo#184659
Forward-Port-Of: odoo/odoo#198352
Original PR description
Forward-Port-Of: odoo/odoo#198352
**Problem**: Wrapping links with `feff` chars allows placing the cursor at their inner or outer edge. However, if the parent is `contenteditable=false`, this behavior is unnecessary since navigation outside the link is already blocked. **Example**: `<div contenteditable=false>/ZWS/<a contenteditable=true>` `/ZWS/ab[]c</a></div>` Pressing the left arrow key repeatedly places the cursor at the start of `a`, before `feff`: `<div contenteditable=false>/ZWS/<a contenteditable=true>` `[]/
Original PR description
**Problem**: Wrapping links with `feff` chars allows placing the cursor at their inner or outer edge. However, if the parent is `contenteditable=false`, this behavior is unnecessary since navigation…
**Problem**: Wrapping links with `feff` chars allows placing the cursor at their inner or outer edge. However, if the parent is `contenteditable=false`, this behavior is unnecessary since navigation outside the link is already blocked. **Example**: `<div contenteditable=false>/ZWS/<a contenteditable=true>` `/ZWS/ab[]c</a></div>` Pressing the left arrow key repeatedly places the cursor at the start of `a`, before `feff`: `<div contenteditable=false>/ZWS/<a contenteditable=true>` `[]/ZWS/abc</a></div>` This forces an extra left-arrow press to move past `a`, which is redundant since only the link itself is editable. **Solution**: Wrap links with `feff` only if their parent element is `contenteditable=true`. **Steps to Reproduce**: 1. Add a Form snippet. 2. Focus on the "Submit" button. 3. Press the "Home" button to move the cursor to the start. 4. Press the right arrow key twice. - **Expected**: Cursor moves after the first visible char. - **Issue**: Cursor stops prematurely before the character. opw-4505962 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195704
Currently, an error occurs when users press the data-hotkey 'ALT + Q' to split expense and any expense is not available in the split expense line. Step to produce: - Install the ```hr_expense``` module. - Create an expense, add a category, and click on the `Split Expense` button. - Delete all expenses from the split expense line, and press the data-hotkey `ALT + Q` to click on the `Split Expense` button to split expenses. ```IndexError: tuple index out of range``` This occurs becau
Original PR description
Currently, an error occurs when users press the data-hotkey 'ALT + Q' to split expense and any expense is not available in the split expense line. Step to produce: - Install the ```hr_expense```…
Currently, an error occurs when users press the data-hotkey 'ALT + Q' to split expense and any expense is not available in the split expense line. Step to produce: - Install the ```hr_expense``` module. - Create an expense, add a category, and click on the `Split Expense` button. - Delete all expenses from the split expense line, and press the data-hotkey `ALT + Q` to click on the `Split Expense` button to split expenses. ```IndexError: tuple index out of range``` This occurs because the system attempts to access the first expense from the split expense line [1], but expenses are not available. Link [1]: https://github.com/odoo/odoo/blob/280b762e7cd1b3d9a578bbae60cbb9b137ee5ce5/addons/hr_expense/wizard/hr_expense_split_wizard.py#L36 To resolve this issue, Disable a 'Split Expense' button after simply adding a `disabled` attribute on it. Sentry-6015854429 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190323
When installing a l10n module the data often include a `try_loading` for the chart template. The chart should not be applied to the current env.company if the country id does not match the template. When the CI installs modules via commandline with demo, the env company does not match the l10n most of the times, yet the chart is being applied to it. This leads to incorrect data and some tests failing, like applying edi format validations on unrelated companies. We previously had patches in t
Original PR description
When installing a l10n module the data often include a `try_loading` for the chart template. The chart should not be applied to the current env.company if the country id does not match the template. When the CI installs modules via commandline with demo, the env company does not match the l10n most of the times, yet the chart is being applied to it. This leads to incorrect data and some tests failing, like applying edi format validations on unrelated companies. We previously had patches in tests to disable some edi validations but the root cause is a wrong fiscal country id on the env company. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194799
This commit fixes an issue with the X api calls where the oauth_signature was no longer correct in recent Python versions. `url_quote` used to consider the character `,` as unsafe and quoted it when creating the signature. From Python3.11 this method consider it as reserved but not as unsafe thus not quoting it. This change restores the old behavior to quote so as to respect the oauth_signature format given by X's doc. task-4583612 Forward-Port-Of: odoo/enterprise#79834
Original PR description
This commit fixes an issue with the X api calls where the oauth_signature was no longer correct in recent Python versions. `url_quote` used to consider the character `,` as unsafe and quoted it when creating the signature. From Python3.11 this method consider it as reserved but not as unsafe thus not quoting it. This change restores the old behavior to quote so as to respect the oauth_signature format given by X's doc. task-4583612 Forward-Port-Of: odoo/enterprise#79834