Daily updates from Odoo
Wednesday, January 22, 2025
16 changes · saas-17.2
Miscellaneous changes
**Problem**: In rare edge cases, the selection can have no ranges, causing a crash when attempting to `getRangeAt(0)`. **Solution**: Ensure there are ranges in the selection before accessing them. **Steps to Reproduce**: 1. Split the window, with Odoo on one side and any other application on the other. 2. Navigate to a sales order in Odoo. 3. From the sales order, navigate to the partner. 4. Maximize the window. 5. Return to the sales order. 6. Split the window again. 7. Scroll do
Original PR description
**Problem**: In rare edge cases, the selection can have no ranges, causing a crash when attempting to `getRangeAt(0)`. **Solution**: Ensure there are ranges in the selection before accessing them. **Steps to Reproduce**: 1. Split the window, with Odoo on one side and any other application on the other. 2. Navigate to a sales order in Odoo. 3. From the sales order, navigate to the partner. 4. Maximize the window. 5. Return to the sales order. 6. Split the window again. 7. Scroll down. opw-4279813 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194385
Before this commit: =================== - The purchase tour was failing because the tour's JavaScript used an incorrect class selector (targeting 'partner_id'), which prevented it from locating the intended DOM element. Consequently, the sequence of actions was interrupted, causing the tour to break midway. After this commit: =================== - The issue has been resolved by updating the tour to use the correct and unique class selector. This ensures the tour accurately tar
Original PR description
Before this commit: =================== - The purchase tour was failing because the tour's JavaScript used an incorrect class selector (targeting 'partner_id'), which prevented it from locating the intended DOM element. Consequently, the sequence of actions was interrupted, causing the tour to break midway. After this commit: =================== - The issue has been resolved by updating the tour to use the correct and unique class selector. This ensures the tour accurately targets the intended element, allowing it to proceed without interruptions. As a result, the purchase tour runs successfully and achieves its intended purpose. TaskId: 4268662 Forward-Port-Of: odoo/odoo#193536 Forward-Port-Of: odoo/odoo#184735
For my friends at tech support Exceptions in RPC are handled and a Response is returned directly. It is a different behaviour than jsonrpc where the exception is raised and the dispatcher wraps it is a Response after logging the exception. The xmlrpc code should also raise an exception so that it can be handled in http.py. Adding here a way to detect if a Response was already generated for an exception in the exception handler of HTTP. Related: #193208 Forward-Port-Of: odoo/odoo#193659 Fo
Original PR description
For my friends at tech support Exceptions in RPC are handled and a Response is returned directly. It is a different behaviour than jsonrpc where the exception is raised and the dispatcher wraps it is a Response after logging the exception. The xmlrpc code should also raise an exception so that it can be handled in http.py. Adding here a way to detect if a Response was already generated for an exception in the exception handler of HTTP. Related: #193208 Forward-Port-Of: odoo/odoo#193659 Forward-Port-Of: odoo/odoo#193421
Steps to reproduce: ----- - Create a MO - Duplicate it - Change the scheduled date - Confirm Issue: --- This [changes](https://github.com/odoo/odoo/commit/7c808beaf36853b4d9171ef0981d1ec9c4b73a44), is trying to timedelta between str and datetime leading to an error. Fix: --- To fix this the date_start is set as a datetime and removing the conversion later in the code. opw-4489618 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Original PR description
Steps to reproduce: ----- - Create a MO - Duplicate it - Change the scheduled date - Confirm Issue: --- This [changes](https://github.com/odoo/odoo/commit/7c808beaf36853b4d9171ef0981d1ec9c4b73a44), is trying to timedelta between str and datetime leading to an error. Fix: --- To fix this the date_start is set as a datetime and removing the conversion later in the code. opw-4489618 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194376
Currently, it is not possible to inherit the company selector widget. To modify the behavior of the widget, developers need to create a new one instead of inheriting it, which is not ideal. This commit introduces changes that allow inheriting the company selector widget and also makes it easier to replace or extend the CompanySelector class within the SwitchCompanyMenu. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#1
Original PR description
Currently, it is not possible to inherit the company selector widget. To modify the behavior of the widget, developers need to create a new one instead of inheriting it, which is not ideal. This commit introduces changes that allow inheriting the company selector widget and also makes it easier to replace or extend the CompanySelector class within the SwitchCompanyMenu. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175094
Description of the issue this PR addresses: Pressing enter in the `s_popup` snippet after making it visible via the right panel would hide the popup. This occurred because the mutation observer detected changes which shows the modal and rolled them back during the `insertLineBreak` operation. This commit ensures that those mutations are not observed. task-4255083 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193989
Original PR description
Description of the issue this PR addresses: Pressing enter in the `s_popup` snippet after making it visible via the right panel would hide the popup. This occurred because the mutation observer detected changes which shows the modal and rolled them back during the `insertLineBreak` operation. This commit ensures that those mutations are not observed. task-4255083 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193989 Forward-Port-Of: odoo/odoo#191810
When the pos was loading only a part of the products, the request should follow those rules order: - product is a favorite - product is a service - product had stock moves soon - product update But this request didn't take into account consumables products and if there was no stock move, the value was null and postgres consider null values first when ordering desc. Now with that changes, the order is correctly set based on the rules above. --- I confirm I have signed the CLA and read
Original PR description
When the pos was loading only a part of the products, the request should follow those rules order: - product is a favorite - product is a service - product had stock moves soon - product update But this request didn't take into account consumables products and if there was no stock move, the value was null and postgres consider null values first when ordering desc. Now with that changes, the order is correctly set based on the rules above. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#129227 Forward-Port-Of: odoo/odoo#124223
Steps order in the tests was causing an underterministic behavior when the test was run on the runbot. We change the order of the steps to try to make the test more deterministic and consistent. Runbot Error: 57047 Forward-Port-Of: odoo/odoo#172522 Forward-Port-Of: odoo/odoo#172402
Original PR description
Steps order in the tests was causing an underterministic behavior when the test was run on the runbot. We change the order of the steps to try to make the test more deterministic and consistent. Runbot Error: 57047 Forward-Port-Of: odoo/odoo#172522 Forward-Port-Of: odoo/odoo#172402
Description of the issue/feature this PR addresses: Current behavior before PR: The "Old unit price" text in the POS products screen is not showing properly when the l10n_fr_pos_cert is installed. Desired behavior after PR is merged: The "Old unit price" text will be showing up properly using simular code to what is on https://github.com/odoo/odoo/blob/a0ab0ce39bf4cba5e90eae109bcd006b39e31c6c/addons/l10n_fr_pos_cert/static/src/xml/OrderReceipt.xml#L14 --- I confirm I have si
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: The "Old unit price" text in the POS products screen is not showing properly when the l10n_fr_pos_cert is installed. Desired behavior after PR is merged: The "Old unit price" text will be showing up properly using simular code to what is on https://github.com/odoo/odoo/blob/a0ab0ce39bf4cba5e90eae109bcd006b39e31c6c/addons/l10n_fr_pos_cert/static/src/xml/OrderReceipt.xml#L14 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184840
In order to have the european certification, we need to show 3 decimal places of the weight. To achieve this, we are now removing the rounding based on product's unit and the unit itself in the shown value. This should be okay since we are changing the way we send payload to the consumer of the ScaleScreen -- basically, we are sending the full unrounded value. Forward-Port-Of: odoo/odoo#183209
Original PR description
In order to have the european certification, we need to show 3 decimal places of the weight. To achieve this, we are now removing the rounding based on product's unit and the unit itself in the shown value. This should be okay since we are changing the way we send payload to the consumer of the ScaleScreen -- basically, we are sending the full unrounded value. Forward-Port-Of: odoo/odoo#183209
### Issue: The current descriptions and naming of the `Date` fields (`date_begin`, `date_end`) and the `Timezone` field (`date_tz`) can be confusing in the form view of the event model. Specifically: The timezone used for converting the form dates to the database is determined by the context and not by the `Timezone` field present on the form. However, this `Timezone` field determines the timezone used for displaying the event's date/time on the website. This change tries to clarify the si
Original PR description
### Issue: The current descriptions and naming of the `Date` fields (`date_begin`, `date_end`) and the `Timezone` field (`date_tz`) can be confusing in the form view of the event model. Specifically: The timezone used for converting the form dates to the database is determined by the context and not by the `Timezone` field present on the form. However, this `Timezone` field determines the timezone used for displaying the event's date/time on the website. This change tries to clarify the situation. opw-4323142 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193587 Forward-Port-Of: odoo/odoo#190867
Description of the issue/feature this PR addresses: The method action_add_from_catalog in purchase_stock replaces the product's kanban view with a purchase-specific one. This method directly replaces the first view in the list, which could be wrong if another module changes the default view of the catalog. This commit updates the method to replace only the kanban view, ensuring that other view types are preserved correctly. --- I confirm I have signed the CLA and read the PR guidelines
Original PR description
Description of the issue/feature this PR addresses: The method action_add_from_catalog in purchase_stock replaces the product's kanban view with a purchase-specific one. This method directly replaces the first view in the list, which could be wrong if another module changes the default view of the catalog. This commit updates the method to replace only the kanban view, ensuring that other view types are preserved correctly. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175438
-This commit remove custom properties 'nodestroy' to avoid warning like this: `odoo.addons.web.controllers.utils: Action 'Customer Invoice' contains custom properties 'nodestroy'`. Passing them via the `params` or `context` properties is recommended instead 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:
Original PR description
-This commit remove custom properties 'nodestroy' to avoid warning like this: `odoo.addons.web.controllers.utils: Action 'Customer Invoice' contains custom properties 'nodestroy'`. Passing them via the `params` or `context` properties is recommended instead 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#161814
Steps to reproduce: - Add a "Call To Action" block on the homepage > Save it as a custom snippet. - Add a new page > Drop the saved custom block on it > Drop Also another "Title" block. - Translate the custom block in the new page > At this point, the translation is fine. - Go to "Edit" mode > Edit the other block ("Title") > Save. - The translations for the custom "Call To Action" is lost. Starting from [1], the translation of custom snippets was supported and when dropping a save
Original PR description
Steps to reproduce: - Add a "Call To Action" block on the homepage > Save it as a custom snippet. - Add a new page > Drop the saved custom block on it > Drop Also another "Title" block. - Translate…
Steps to reproduce:
- Add a "Call To Action" block on the homepage > Save it as a custom
snippet.
- Add a new page > Drop the saved custom block on it > Drop Also
another "Title" block.
- Translate the custom block in the new page > At this point, the
translation is fine.
- Go to "Edit" mode > Edit the other block ("Title") > Save.
- The translations for the custom "Call To Action" is lost.
Starting from [1], the translation of custom snippets was supported and
when dropping a saved custom snippet in a page/view, the snippet will
copy its translation from the saved view (see:
`_copy_custom_snippet_translations()`). This code will always update the
terms in the translation dictionary, even when the page has its custom
translation for them.
The goal of this commit is to fix this behavior by only allowing the
update of a term translation when the page has no custom translation
for it.
[1]: https://github.com/odoo/odoo/commit/d3426b7714012e833caae10281cfb8433223299a
opw-3930862
opw-4141290
Forward-Port-Of: odoo/odoo#194234
Forward-Port-Of: odoo/odoo#177960Description 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#194426 Forward-Port-Of: odoo/odoo#192048
Original PR description
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#194426 Forward-Port-Of: odoo/odoo#192048
Issue --> Using the 'product.product.name' field in loyalty.reward.discount_product_domain that is not added via the `_loader_params_product_product` loader causes an error in the matchCondition function https://github.com/odoo/odoo/blob/9b0f528aa02743372934df8e64d1cc0ad74903b6/addons/web/static/src/core/domain.js#L331 where variable fieldValue is undefined if the field is not available. Solution --> Adding the `name` field search parameters in the `_loader_params_product_product` simi
Original PR description
Issue --> Using the 'product.product.name' field in loyalty.reward.discount_product_domain that is not added via the `_loader_params_product_product` loader causes an error in the matchCondition function https://github.com/odoo/odoo/blob/9b0f528aa02743372934df8e64d1cc0ad74903b6/addons/web/static/src/core/domain.js#L331 where variable fieldValue is undefined if the field is not available. Solution --> Adding the `name` field search parameters in the `_loader_params_product_product` similar to https://github.com/odoo/odoo/pull/186804 opw-4410460 Forward-Port-Of: odoo/odoo#194637