Friday, June 28, 2024
24 changes · saas-17.2
Enhancements to existing features
This update improves Odoo's internal HOOT testing framework and related web/mail test helpers. It makes automated tests easier to write and more accurate, reducing the risk of defects reaching users while keeping changes limited to the testing ecosystem.
Original PR description
## Pull Request HOOT (PRHOOT) - part 18 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 18 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Enterprise: https://github.com/odoo/enterprise/pull/65657 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This change fixes an intermittent failure in an automated test for creating mail discussion channels. It improves the reliability of internal quality checks without changing how users experience the product.
Original PR description
Before this PR, the `can create a new channel` test was sometimes failing. This test asserts that the `/discuss/channel/messages` route is called using the step API. However, creating a new channel also sets the last seen message of the user. Most of the time, the test ended before this step but when it didn't, the test would fail as this step is not verified. This PR ignore this step as it is not relevant for the current test. runbot-68993
Miscellaneous changes
Steps to reproduce: - Install Accounting and l10n_es_edi_tbai - Switch to a Spanish company (e.g. ES Company) - In Accounting settings, select "Hacienda Foral de Bizkaia" as "Tax Agency for TBAI" - Create a vendor bill: * Vendor: [a Spanish vendor] * Invoice Lines: (These amounts are important) -------------------------------- Quantity | Price | Taxes -------------------------------- 2 | 2896.74 | 21% G 4 | 121.52 | 21% G - Confirm
Original PR description
Steps to reproduce:
- Install Accounting and l10n_es_edi_tbai
- Switch to a Spanish company (e.g. ES Company)
- In Accounting settings, select "Hacienda Foral de Bizkaia" as "Tax Agency for TBAI"
- Create a vendor bill:
* Vendor: [a Spanish vendor]
* Invoice Lines: (These amounts are important)
--------------------------------
Quantity | Price | Taxes
--------------------------------
2 | 2896.74 | 21% G
4 | 121.52 | 21% G
- Confirm the bill
- Sent bill to TicketBAI
Issue:
The generated xml will be rejected because "BaseImponible" value has more than 2 decimals.
Cause:
A floating point issue during the computation of "BaseImponible" with these specific values.
opw-3987704
Forward-Port-Of: odoo/odoo#170724This fix makes Odoo's web testing tools handle simulated clicks more like real user clicks. It helps prevent tests from failing or missing behavior when earlier pointer events are intentionally stopped, improving confidence in web interface testing.
Original PR description
Before this commit, when using HOOT pointer event helpers such as `click`, preventing the `pointerup`, `mouseup` or `touchend` event would prevent the final `click` event to be dispatched. Now, the `click` event can be dispatched regardless, as it would be during an actual user-triggered click. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix restores validation for user and partner timezone selections, helping prevent invalid timezone values from being saved. It matters because accurate timezone settings support correct scheduling, messaging, and date/time display across Odoo.
Original PR description
In odoo/odoo#154177 it was apparently decided that validating callable selections is unnecessary, leading to the lang and timezone fields not being validated anymore. Nothing to be done for the lang as it relies on the installed langs and thus the corresponding database, however the tz list has effectively been static / global since odoo/odoo#26496 (f11d143f00add145f1a05b51968108e46b96ca87). So initialise `tz` with the precomputed value instead of the function which returns the precomputed value. cherry-pick of ff8ac5d13cd6bb
Users can now download all attachments from a chatter message without encountering an error. The fix corrects the download link so it works reliably from newer page URLs, reducing disruption when sharing or retrieving project-related files.
Original PR description
Steps to reproduce: ------------------- - Install `Project` module (for test purpose) - Open any project and create a task - Post a message with multiple attachments - Select "Download Files" in the message options Issue: ------ Traceback Cause: ------ Calling directly the route without starting with `/`. The issue started since the following commit [1] because we changed how the URLs are generated; Before: `localhost/web#id=55&...` After: `localhost/odoo/project/5/tasks/55` With these changes, since the download URL don't start with `/`, the browser will try to download the file from the current URL who, combined with the download URL, is not a real route. [1] https://github.com/odoo/odoo/commit/c63d14a0485a553b74a8457aee158384e9ae6d3f Solution: --------- Add `/` at the beginning of the download URL. opw-4009021
When you access the journal items list view with a `search_default_account_id` and try to modify the account on a line that has an analytic distribution, a validation error occurs. ### Steps to Reproduce 1. Install `account_accountant`. 2. Create an invoice with a line that has an analytic account and an account A. 3. Open the trial balance and access the journal items of account A using the three-dots menu. 4. Select the line from the invoice you created. 5. Attempt to change its acco
Original PR description
When you access the journal items list view with a `search_default_account_id` and try to modify the account on a line that has an analytic distribution, a validation error occurs. ### Steps to…
When you access the journal items list view with a `search_default_account_id` and try to modify the account on a line that has an analytic distribution, a validation error occurs. ### Steps to Reproduce 1. Install `account_accountant`. 2. Create an invoice with a line that has an analytic account and an account A. 3. Open the trial balance and access the journal items of account A using the three-dots menu. 4. Select the line from the invoice you created. 5. Attempt to change its account. You will encounter the following validation error: ``` The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Analytic Line (account.analytic.line) Constraint: account_analytic_line_account_id_fkey ``` ### Cause When accessing the journal items from the Trial Balance report, the `search_default_account_id` context key is automatically applied to filter the accounts you selected. However, using `search_default_` with a relational field also creates a `default_` context key for that field. Here, `default_account_id` is added to the context. When changing the account on a move line that has analytic accounts, the system deletes the existing related analytic items and creates new ones. Analytic items have an `account_id` field. Due to the `default_account_id` context key intended for the journal items, the same key is erroneously applied to the newly created analytic item, leading to a validation error because of a foreign key constraint. ### Fix I was thinking about cleaning the context but after discussing with JOL, we decided to only get rid of the problematic default key. opw-3958980 Forward-Port-Of: odoo/odoo#168329
Typing in select2 being in modals does not work from v16 as select2 and bootstrap modals are in conflict when it comes to the focus of elements. HACK ==== Disable bootstrap modal's focustrap in order to let the user type in the select2 on the modal's attachment. (Solution taken from odoo/enterprise#35733) Task-3527175 Forward-Port-Of: odoo/odoo#170956 Forward-Port-Of: odoo/odoo#154039
Original PR description
Typing in select2 being in modals does not work from v16 as select2 and bootstrap modals are in conflict when it comes to the focus of elements. HACK ==== Disable bootstrap modal's focustrap in order to let the user type in the select2 on the modal's attachment. (Solution taken from odoo/enterprise#35733) Task-3527175 Forward-Port-Of: odoo/odoo#170956 Forward-Port-Of: odoo/odoo#154039
Open tax "IVA 0% Entregas Intracomunitarias exentas" Set Tax Scope to False Create an invoice to an EU partner Add an invoice line (select the mentioned tax) Confirm Send for Validation Traceback: odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'DesgloseTipoOperacion' Template: l10n_es_edi_tbai.template_invoice_factura Path: /t/TipoDesglose/DesgloseTipoOperacion/PrestacionServicios Node: <PrestacionServicios t-if="invoice_info.get(\'Prestacio
Original PR description
Open tax "IVA 0% Entregas Intracomunitarias exentas" Set Tax Scope to False Create an invoice to an EU partner Add an invoice line (select the mentioned tax) Confirm Send for Validation Traceback: odoo.addons.base.models.ir_qweb.QWebException: Error while render the template KeyError: 'DesgloseTipoOperacion' Template: l10n_es_edi_tbai.template_invoice_factura Path: /t/TipoDesglose/DesgloseTipoOperacion/PrestacionServicios Node: <PrestacionServicios t-if="invoice_info.get(\'PrestacionServicios\')"/> This occurs because tax info was not fetched properly When invoicing to a foreign partner the tax scope needs to be properly configured opw-3877924 Forward-Port-Of: odoo/odoo#171018
Prior to this commit, scanning a product barcode for a missing product would trigger a search for the missing pricelist, potentially leading to an error. This commit fixes this issue by preventing the pricelist search when the product is missing. opw-3850050 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166579
Original PR description
Prior to this commit, scanning a product barcode for a missing product would trigger a search for the missing pricelist, potentially leading to an error. This commit fixes this issue by preventing the pricelist search when the product is missing. opw-3850050 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166579
After the refatoring of the POS, the big scrollbar options does not work anymore. This commit restore the big scrollbar options. taskId: 3419014 opw-3998526 Close this one: https://github.com/odoo/odoo/pull/170746 Forward-Port-Of: odoo/odoo#170011
Original PR description
After the refatoring of the POS, the big scrollbar options does not work anymore. This commit restore the big scrollbar options. taskId: 3419014 opw-3998526 Close this one: https://github.com/odoo/odoo/pull/170746 Forward-Port-Of: odoo/odoo#170011
Steps to reproduce: ------------------- - Install `Sign` and `Website` (for test purpose) - Go to the website and enable the web editor - Click on Theme tab, and set Button -> Primary Style to `Flat` - Go to Sign module and copy the Share link of a document - Open it in an incognito window Issue: ------ Error: `The target selector was not found` Cause: ------ Trying to extend `.btn.flat` selector while it is not declared in the dependencies of the `sign.assets_public_sign`
Original PR description
Steps to reproduce: ------------------- - Install `Sign` and `Website` (for test purpose) - Go to the website and enable the web editor - Click on Theme tab, and set Button -> Primary Style to `Flat` - Go to Sign module and copy the Share link of a document - Open it in an incognito window Issue: ------ Error: `The target selector was not found` Cause: ------ Trying to extend `.btn.flat` selector while it is not declared in the dependencies of the `sign.assets_public_sign` assets. Solution: --------- Set the `extend` to `optional`. opw-3989063 Forward-Port-Of: odoo/odoo#170261
In commit [1], the "Themes Options" have been reorganized to make them easier to find. With this relayout, the buttons style options have also been modified in order to have a third choice "Flat", in addition to "Fill" and "Outline". However, the way it was done causes some issues. Indeed, it wrongly sets the `btn-(primary|secondary)-(outline|flat)` CSS variables to `'True'` instead of the `true` boolean, and to `null` instead of `false`, which is not correct. This happens because `cust
Original PR description
In commit [1], the "Themes Options" have been reorganized to make them easier to find. With this relayout, the buttons style options have also been modified in order to have a third choice "Flat", in…
In commit [1], the "Themes Options" have been reorganized to make them easier to find. With this relayout, the buttons style options have also been modified in order to have a third choice "Flat", in addition to "Fill" and "Outline". However, the way it was done causes some issues. Indeed, it wrongly sets the `btn-(primary|secondary)-(outline|flat)` CSS variables to `'True'` instead of the `true` boolean, and to `null` instead of `false`, which is not correct. This happens because `customizeButtonStyle` now sends boolean values to the `_makeSCSSCusto` function, instead of strings representing these booleans. This results in the backend RPC call setting the variables to the Python boolean `True`, or to `null` in the falsy case because of the `"null"` default value. While it does not seem to break anything in general, there are issues when using themes that redefine these variables (e.g. "Avantgarde", "Enark", "Cobalt",...). Indeed, it is impossible to set the buttons corresponding style to "Fill". This happens because choosing "Fill" is supposed to set both variables to `false`, but because of the boolean values being sent to `_makeSCSSCusto`, the value that is in fact set is `"null"`. This therefore makes them fallback to the value defined in the theme, forcing them to `true` and preventing the "Fill" style from being applied. This commit fixes these issues by properly giving string values to `_makeSCSSCusto`. For already existing databases, all the variables that have been set to `'True'` will have their value replaced by `true`, thanks to the `o-map-omit` SCSS function. Note that the `'False'` case is also added, in order to be consistent. [1]: https://github.com/odoo/odoo/commit/388e4bb2bfcaebdd4ff30277fb49a034592d7086 opw-3957157 Forward-Port-Of: odoo/odoo#170015
Related to https://github.com/odoo/enterprise/pull/51266 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169012
Original PR description
Related to https://github.com/odoo/enterprise/pull/51266 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169012
Added the basic community localization package of Tanzania Added COA, taxes, tax group, tax report, and fiscal positions task-3783153 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156503
Original PR description
Added the basic community localization package of Tanzania Added COA, taxes, tax group, tax report, and fiscal positions task-3783153 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156503
Issue: ====== Image and icons changes and dropped snippets are not autosaved, changes are lost when you switch tab. Steps to reproduce the issue: ============================= For Image and icon: - Go to email marketing - Choose a template with an image - Update the image and click on another tab directly (A/B tests for example) - Go back to mail body tab, the changes are not saved For dropped snippets: - Go to email marketing - Choose any template - Click on another tab (A/
Original PR description
Issue: ====== Image and icons changes and dropped snippets are not autosaved, changes are lost when you switch tab. Steps to reproduce the issue: ============================= For Image and icon: -…
Issue: ====== Image and icons changes and dropped snippets are not autosaved, changes are lost when you switch tab. Steps to reproduce the issue: ============================= For Image and icon: - Go to email marketing - Choose a template with an image - Update the image and click on another tab directly (A/B tests for example) - Go back to mail body tab, the changes are not saved For dropped snippets: - Go to email marketing - Choose any template - Click on another tab (A/B tests for example) - Go back to meil body tab - Add snippet click directly on another tab - Go back to mail body tab , the changes are not saved Origin of the issue: ==================== For Image and Icon: When we open the image media dialog, `_onWysiwygBlur` is called which means we lost the focus from the editable view. Old updates are saved because we call `commitChanges` but the updates after the change of the image are not since we lost the focus of the wysiwyg. Switching to another tab will not trigger `blur` event again so we loose the changes. (same flow for icon change). For dropped snippets: The first switch of tabs will trigger the blur event and will commit changes. When we switch again to the mail body tab, the focus isn't on the editable, we drop the snippet , still no focus on the editable so no `blur` event is called and we loose the changes again. We call `commitChanges` on `onWillUnmount` but we don't pass the paremeters from `mass_mailing_html_field` to its parent class so we loose the `urgent` flag which is responsible to save the data before destroying the component. Passing just the args in `commitChanges` will produce another issue about `Component is destroyed`. To have a minimal change in stable we just refocus on the wysiwyg on the mentioned 2 cases so the updates will be applied when blurring the `wysiwyg` Solution: ========= Put the focus again in the editor's window. Forward-Port-Of: odoo/odoo#167753
Steps to reproduce: - Install "Subscriptions" - Go to "Configuration" -> "Alerts" - Create a new alert: - Add a name for the alert - Action: Create next activty - Trigger On: Modification - Activtiy: To Do - Add a summary - Add a note - Due Date In: 1 - Due Date type: Put it blank Issues: When triggered the action will result in a traceback due to `activity_date_deadline_range_type`. https://github.com/odoo/odoo/blob/9a62d0c82cdc47718181aed36cad763499b4a51d/addo
Original PR description
Steps to reproduce: - Install "Subscriptions" - Go to "Configuration" -> "Alerts" - Create a new alert: - Add a name for the alert - Action: Create next activty - Trigger On: Modification - Activtiy: To Do - Add a summary - Add a note - Due Date In: 1 - Due Date type: Put it blank Issues: When triggered the action will result in a traceback due to `activity_date_deadline_range_type`. https://github.com/odoo/odoo/blob/9a62d0c82cdc47718181aed36cad763499b4a51d/addons/mail/models/ir_actions_server.py#L123-L124 [Linked PR](https://github.com/odoo/enterprise/pull/63816) opw-3946293 Forward-Port-Of: odoo/odoo#170930 Forward-Port-Of: odoo/odoo#168043
According to the documentation, the user receives their registration code through SMS, so phone number label is misleading. Steps to reproduce: 1.Install account_peppol > install an peppol egilible accounting l10n (i.e l10n_be) 2.In settings > technical > system parameter > set account_peppol.edi.mode to test 2.in settings search for peppol 3.notice how the phone number is requested in the registration form 4.click on validate registration 5.notice how the validation button displays
Original PR description
According to the documentation, the user receives their registration code through SMS, so phone number label is misleading.
Steps to reproduce:
1.Install account_peppol > install an peppol egilible accounting l10n (i.e l10n_be)
2.In settings > technical > system parameter > set account_peppol.edi.mode to test
2.in settings search for peppol
3.notice how the phone number is requested in the registration form
4.click on validate registration
5.notice how the validation button displays "verify phone number" while the verification code is sent by sms
Solution:
refactor labels, buttons, helps and errors message to indicate mobile number. The actual field account_peppol_phone_number is not renamed as per stable version changes condition.
opw-3977664
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#170870
Forward-Port-Of: odoo/odoo#169607*= hr_expense, project_sale_expense -STEP TO REPRODUCE: Create an expense sheet , submit then approve it as well, go to Pg admin or update the view manually to see the field `approval_state`. The `approval_state` is now approved. After that try to refuse the sheet, `approval_state` still approved while it should be consider `cancel` (Refuse) -Solution is to forbids unrealistic case where we shouldn't allow user to cancel when it linked to a journal entry and also update `approval_stat
Original PR description
*= hr_expense, project_sale_expense -STEP TO REPRODUCE: Create an expense sheet , submit then approve it as well, go to Pg admin or update the view manually to see the field `approval_state`. The `approval_state` is now approved. After that try to refuse the sheet, `approval_state` still approved while it should be consider `cancel` (Refuse) -Solution is to forbids unrealistic case where we shouldn't allow user to cancel when it linked to a journal entry and also update `approval_state` as well -> Therefore some test in `test_project_profitability` need to adapt 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 Forward-Port-Of: odoo/odoo#168430
Prior to this commit, orders loaded from other sessions did not load missing partners. opw-3981458 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169963 Forward-Port-Of: odoo/odoo#169763
Original PR description
Prior to this commit, orders loaded from other sessions did not load missing partners. opw-3981458 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169963 Forward-Port-Of: odoo/odoo#169763
…ice is not in the db 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 Forward-Port-Of: odoo/odoo#170616
Original PR description
…ice is not in the db 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 Forward-Port-Of: odoo/odoo#170616
Currently we are unable to pay using viva wallet as the terminalID is not sent during the request. Steps to reproduce: ------------------- * Go to **Point of Sale** * Under **Configuration**, select **Payment Methods** * Create a new payment method and configure it for viva wallet * In the shop setting, add this payment method * Open shop session * Make an order and try to pay with viva wallet > Observation: There are some issues between us and Viva Wallet, try again later. [{'type':
Original PR description
Currently we are unable to pay using viva wallet as the terminalID is not sent during the request. Steps to reproduce: ------------------- * Go to **Point of Sale** * Under **Configuration**, select…
Currently we are unable to pay using viva wallet as the terminalID is not sent during the request.
Steps to reproduce:
-------------------
* Go to **Point of Sale**
* Under **Configuration**, select **Payment Methods**
* Create a new payment method and configure it for viva wallet
* In the shop setting, add this payment method
* Open shop session
* Make an order and try to pay with viva wallet
> Observation: There are some issues between us and Viva Wallet, try again
later. [{'type': 'missing', 'loc': ['body', 'terminalId'], 'msg': 'Field required', 'input': {'sessionId': '00007-001-0001 - c9a31bfb-b517-4e65-a1ee-b00a1d86731b', 'cashRegisterId': 'Mitchell Admin', 'amount': 206885, 'currencyCode': 978, 'merchantReference': '00007-001-0001 - c9a31bfb-b517-4e65-a1ee-b00a1d86731b/7', 'customerTrns': ' ', 'preauth': False, 'maxInstalments': 0, 'tipAmount': 0}, 'url': 'https://errors.pydantic.dev/2.6/v/missing'}]
Why the fix:
------------
As the error states, the request is missing the information about the terminal ID. That is due to the fact that starting from saas-17.1 parameters are loaded through the function `_load_data_params` and not `_loader_params_(...)`.
opw-3983997
Forward-Port-Of: odoo/odoo#170531For a (too) long time now, the Odoo Windows installer is build by using virtual machines. Maintaining those VM is very painfull. Also the result was unpredictable due to the erratic behavior of MS Windows. With this commit, the build package system now uses a Docker container like the other builds, greatly simplifying the whole process. Forward-Port-Of: odoo/odoo#171123 Forward-Port-Of: odoo/odoo#169519
Original PR description
For a (too) long time now, the Odoo Windows installer is build by using virtual machines. Maintaining those VM is very painfull. Also the result was unpredictable due to the erratic behavior of MS Windows. With this commit, the build package system now uses a Docker container like the other builds, greatly simplifying the whole process. Forward-Port-Of: odoo/odoo#171123 Forward-Port-Of: odoo/odoo#169519
Before this commit it was possible to remove employees with ongoing contracts. This commit adds a check to prevent this case. task: 3930155 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170289 Forward-Port-Of: odoo/odoo#166338
Original PR description
Before this commit it was possible to remove employees with ongoing contracts. This commit adds a check to prevent this case. task: 3930155 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#170289 Forward-Port-Of: odoo/odoo#166338