Saturday, August 31, 2024
10 changes · 17.0
Enhancements to existing features
This update removes obsolete, unused code from the Argentina localization module. It has no expected effect on day-to-day use, but helps keep the codebase simpler and easier to maintain.
Original PR description
Before 17 process_coa_translations might have been needed in multi_lang localizations, but it is no longer needed. It is also not called. No task linked. Just saw it checking other stuff. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fix lets Odoo safely close or remove a website widget even if it has not finished loading. It reduces the chance of unexpected page errors in edge cases, improving reliability without changing normal user workflows.
Original PR description
When a widget is destroyed before it is fully initialized, it should not crash. When the widget implementation was merged into the public widget one at [1], that bug was created for public widgets. No existing flow was found to be broken because of this but it would not be a surprise if this actually fixes issues. [1]: https://github.com/odoo/odoo/commit/51b1808ebedf9b810f83d264bb7e9204cab45e4a Found while working on task-3930204
Miscellaneous changes
Since Chrome 128, the default headless mode has been updated to the "new" engine (which is closer to the regular rendering engine). This new mode only supports the window_size syntax where the seperator is a colon. Note: this syntax was already supported by previous Chrome versions. This commit forces the conversion to this new syntax because the old one is plainly ignored starting from Chrome 128, preventing "mobile" tests - at least - from being run in the proper resolution. Refe
Original PR description
Since Chrome 128, the default headless mode has been updated to the "new" engine (which is closer to the regular rendering engine). This new mode only supports the window_size syntax where the seperator is a colon. Note: this syntax was already supported by previous Chrome versions. This commit forces the conversion to this new syntax because the old one is plainly ignored starting from Chrome 128, preventing "mobile" tests - at least - from being run in the proper resolution. Reference: https://chromium.googlesource.com/chromium/src/+/b9b39a430f71c710d16aafcc67278ef77440c18d Forward-Port-Of: odoo/odoo#178400 Forward-Port-Of: odoo/odoo#178320
This update prevents upgrade failures for several country-specific accounting localizations by clearing outdated carryover settings on existing tax report records. Businesses using these localizations can update their databases more reliably without manual cleanup.
Original PR description
Reproduce: 1) Make a database before this PR: #176489 2) change to current version. 3) start database with `-u all` This will fail _check_carryover_target constrain when api.constrains checks for the data, carryover_target was not nullified because it was not in the group of values to be updated . So nullify carryover_target using eval="False" for exisiting records that were changed in #176489. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Malta localization tax report now displays the country name correctly as "Malta" instead of the typo "Matla". This keeps report labels professional and consistent for users working with Maltese accounting reports.
Original PR description
Problem: The account tax report was displaying "Matla" instead of "Malta" Purpose: Fix the type to stay consistent with naming conventions opw-4134520 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Vendor bills created from email aliases now keep common document attachments such as Word and text files. This prevents supporting documents from being lost when suppliers email bills, helping accounting teams review and process invoices more reliably.
Original PR description
Set up email alias for Vendor Bill journal Send email with docx attachment to alias Bill is created Issue: No attachment is present This commit will extend 827b536942a67e91d4283ebd2bf50db5141f0abe to allow more formats opw-4092311 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix stops users from quickly creating field service tasks from timesheets when no customer is assigned. It helps prevent invalid task records and avoids errors caused by missing required customer information.
Original PR description
This commit's purpose is to prevent the creation of a task with quick create with the 'withTaskHour' widget if the project is an fsm one. This is done to prevent the creation of fsm task without a partner set (the field is required).
This update corrects a test that verifies portal users can create and edit knowledge articles. The test was passing incorrectly because it wasn't properly checking access permissions. The fix ensures the test now correctly validates that portal users have the right permissions to perform these actions.
Original PR description
Since odoo/enterprise#38575, portal users can create/edit knowledge articles. However, the test that checks that feature is not correct: - it does not call `check_access_rights()` (for ACLs); - it uses a `res.partner` instead of a `res.users` in `with_user()`. Because the test only checks access rules with a non-existing user, no rules are found, and the check is therefore trivial. In other words, the test passes by accident :-( The fix consists in creating a portal user for the corresponding "customer" contact, and add the expected calls to `check_access_rights()`.
Steps to reproduce: - Go to a website blog post page > Drop a "Table of Content" snippet inside the blog post content. - Switch to translation mode > Try to translate a TOC title > The corresponding navigation label won't be automatically updated. - Save > The translation will be applied depending on whether the title and the navbar item have exactly the same content or not [*]. Starting from [1], the translation of a "Table of Content" navigation label was automatically applied
Original PR description
Steps to reproduce: - Go to a website blog post page > Drop a "Table of Content" snippet inside the blog post content. - Switch to translation mode > Try to translate a TOC title > The corresponding…
Steps to reproduce:
- Go to a website blog post page > Drop a "Table of Content" snippet
inside the blog post content.
- Switch to translation mode > Try to translate a TOC title > The
corresponding navigation label won't be automatically updated.
- Save > The translation will be applied depending on whether the title
and the navbar item have exactly the same content or not [*].
Starting from [1], the translation of a "Table of Content" navigation
label was automatically applied (only the text content) when the
corresponding title was translated, and the user was also warned when
trying to edit them directly in "translation" mode.
This implementation relied on the field observers mechanism to
synchronize translations for the table of content navigation and content
headers.
Unfortunately, the field mutations handler doesn't take translation
fields into consideration when they are part of another field's DOM:
1. Before trying to set the updated field value on its duplicates in the
DOM, the handler is using `_pauseOdooFieldObservers()` to `disconnect()`
all the observers of other fields to prevent receiving mutations from
its own updates.
2. In translation mode, and when the updated field has some inner
translation `<span/>`s, their observers will be disconnected too, and
their mutations will never be linked to the right target.
3. Finally, the `_observeOdooFieldChanges()` is used to observe the
fields again.
Let's take the following example:
```
<div data-oe-model="...">
<span data-oe-translation-initial-sha="...">Text Content</span>
</div>
```
In this case, two observers are created, one for the `[data-oe-model]`
(`O1`) and the other for the `[data-oe-translation-initial-sha]` (`O2`).
When editing the "Text Content" of the `<span/>`, `O1` will be triggered
(for the parent field) and will temporarily disconnect all other fields
observers (including (`O2`)) and as a consequence, `O2` won't be able to
synchronize the value of the translation field on the ones with the same
`data-oe-translation-initial-sha` (which is the same situation as in a
"Table of Content" block).
The goal of this commit is to simply prevent disconnecting inner
translation field observers to allow the translation synchronization
inside a parent field DOM.
[*]: Remark: when a TOC title and its navigation item have different DOM
(e.g., the font color of the title changed), the code from [1] will
always temporarily set the same `data-oe-translation-initial-sha` on
both of them (and restore the original ones before saving), which
explains the different translation values when the field observers are
not working correctly.
[1]: https://github.com/odoo/odoo/commit/5776a358e1b42186d2c26c9bc25010a12811f416
opw-3990039
opw-3888871
Forward-Port-Of: odoo/odoo#176198In commit [1], the carousel controls have been deactivated in edit mode, in order to control the carousel sliding manually so everything is done in the mutex. This was done to avoid asynchronous issues and to have a correct history when using the carousel options. However, these controls are also blocked in translate mode, because it is considered as if it was in edit mode, which should not be the case. This made it impossible to translate the other slides, since we cannot slide the carousel
Original PR description
In commit [1], the carousel controls have been deactivated in edit mode, in order to control the carousel sliding manually so everything is done in the mutex. This was done to avoid asynchronous issues and to have a correct history when using the carousel options. However, these controls are also blocked in translate mode, because it is considered as if it was in edit mode, which should not be the case. This made it impossible to translate the other slides, since we cannot slide the carousel anymore. This commit fixes this by not deactivating the carousel controls if we are in translate mode. Steps to reproduce: - Install an other language. - In edit mode, drop the "Carousel" or the "Quotes" snippet and save. - Change the language of the website and translate it. - Try to slide the carousel. => It is impossible. [1]: https://github.com/odoo/odoo/commit/93ec3ac285dc9ffd363e185a1dc238c6135d79dd opw-4134824 Forward-Port-Of: odoo/odoo#178252