Tuesday, June 4, 2024
24 changes · 17.0
Enhancements to existing features
The IoT homepage now includes a background image, giving the page a more polished and branded appearance. This is a visual improvement only and does not change the page's functionality or user workflow.
Original PR description
Add a background image for the iot homepage 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
Resolved issues and error corrections
The self-ordering point of sale flow no longer fails when a product option includes an image. Image data is excluded from the data sent for ordering, preventing crashes while keeping the ordering experience stable for customers.
Original PR description
Before this commit, loading an attribute value with an image would cause a TypeError due to the image data being of bytes type, which is not JSON serializable. This commit prevents this error by removing the image data before serialization. opw-3957587 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Documentation and clarification updates
A contributor named ngquang has signed the Odoo Contributor License Agreement (CLA), which is a legal requirement for all code contributors. This allows their contributions to be accepted into the Odoo project. The CLA signature has been recorded in the project's documentation.
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
Miscellaneous changes
Description of the issue this commit addresses: When creating an invoice line with the analytic module installed, if the analytic field is show, focusing in on a line adds a little height offset to the entire line which makes the view shaky. This is not wanted. --- Steps to reproduce: 1 - Install analytic app 2 - Open a new invoice and display the analytic field in the invoice lines 3 - Add a new line, don't add any data inside it. 4 - Focus out, focus in, focus out, focus in. 5
Original PR description
Description of the issue this commit addresses: When creating an invoice line with the analytic module installed, if the analytic field is show, focusing in on a line adds a little height offset to…
Description of the issue this commit addresses: When creating an invoice line with the analytic module installed, if the analytic field is show, focusing in on a line adds a little height offset to the entire line which makes the view shaky. This is not wanted. --- Steps to reproduce: 1 - Install analytic app 2 - Open a new invoice and display the analytic field in the invoice lines 3 - Add a new line, don't add any data inside it. 4 - Focus out, focus in, focus out, focus in. 5 - You can see that focus in adds a few px and focus out removes them. --- Desired behavior after this commit is merged: This commit adds a fixed default height to the analyti widget to make sure there is no weird height computation when the focus happens. This way, we can make sure that the line height stays constant whether the focus is in or out of the line. --- no task-feedback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167723
Graph legends now show their hover tooltips in the correct position again. This prevents confusing misplaced popups when users review charts and reports in Odoo.
Original PR description
Since [1] the legends tooltips are misplaced. A similar issue has been fixed for the main tooltips of the graph view. See [2] Since [3] the Chart.js lib has been updated and the event received by hovering the legend is now wrapped in an object. To access the native event we also need to access the `native` key of that object. [1]: https://github.com/odoo/odoo/commit/c8ca9da7bcee2c122a9d6cf8cda89f02823ba42d [2]: https://github.com/odoo/odoo/commit/c1f08c60b7272e5a30951c53b67427e2f205b722 [3]: https://github.com/odoo/odoo/commit/7e3c1ecdb86110912b15722e600f9571692807ed
Fixed an issue where paid Point of Sale orders could trigger an error after a product’s lot tracking was disabled. This helps staff continue reviewing and sorting past paid orders without interruption when product tracking settings change.
Original PR description
Before this commit, an error occurred in the following scenario: - Open Point of Sale and sell a product with lot tracking - Close/Post the Point of Sale session - Open the product record and disable tracking in the inventory tab - Start a new session, click on Orders and sort for Paid orders opw-3921893 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix keeps a company car's current or future driver aligned with the contact linked to the employee record. It helps prevent mismatched driver information in fleet management and improves data consistency for HR and vehicle assignments.
Original PR description
In this Pr, the driver or the future driver of the car is in sync with the partner of the employee Task-3693838
Expense payment registration now also considers the bank accounts linked to the employee's contact record. This helps ensure reimbursements are sent to the correct employee bank account instead of falling back to an unrelated company account.
Original PR description
In 1ed71ba a fix was added to use the employee's bank account in the payment wizard for an expense paid to the employee as it was the company's account before. What we forgot was to also add the bank accounts of the contact of that employee. This commit handles this. task-3945793
Float factor fields now respect the user’s local decimal separator, so values using a comma can be entered correctly. This prevents valid localized numbers from being rejected or saved incorrectly, improving usability for regions that use comma decimals.
Original PR description
Issue: ------ In the input of a float factor field, it is not possible to use the ‘,’ as a decimal point, even if this is defined in the localization. This is because the value is calculated via: ```js let factorValue = value / this.props.factor; ``` does not work with `value = ‘x,y’` and will return `NaN`. Solution: --------- Parser the value by calling super to fallback on `parseFloat` which takes localization into account. opw-3932813
This update fixes the informational message displayed in the CodaBox SODA import wizard for Belgian accounting users. The message text has been updated to match the latest version, ensuring users see the correct and most current guidance when importing bank statements through the CodaBox integration.
Original PR description
Backport codabox soda wizard info text from 17.1
- Re-using results for domains duplicated - Ordering by id instead of default heavy unused order Opening a POS sessions our SQL profiler shows the following query executed too many times: - <img width="770" alt="Screenshot 2024-05-07 at 8 41 09 a m" src="https://github.com/odoo/odoo/assets/6644187/80d7ac19-a042-40bc-a525-063b4074ec0e"> Checking the PY profilers the following method is reported as slow: https://github.com/odoo/odoo/blob/42f5e84eeb1d649feed5e032d65ff74d148b49b8/addons/po
Original PR description
- Re-using results for domains duplicated - Ordering by id instead of default heavy unused order Opening a POS sessions our SQL profiler shows the following query executed too many times: - <img…
- Re-using results for domains duplicated
- Ordering by id instead of default heavy unused order
Opening a POS sessions our SQL profiler shows the following query executed too many times:
- <img width="770" alt="Screenshot 2024-05-07 at 8 41 09 a m" src="https://github.com/odoo/odoo/assets/6644187/80d7ac19-a042-40bc-a525-063b4074ec0e">
Checking the PY profilers the following method is reported as slow:
https://github.com/odoo/odoo/blob/42f5e84eeb1d649feed5e032d65ff74d148b49b8/addons/pos_coupon/models/coupon_program.py#L80
- <img width="1508" alt="Screenshot 2024-05-07 at 8 42 17 a m" src="https://github.com/odoo/odoo/assets/6644187/e46b60f0-cac2-480b-b588-d681f0bc5607">
The reason it is executing the same query too many times with the same domain
So, I have created this change to re-use the result if the domain is repeated
Also, the query generated has heavy `order by`
`order by "res_partner"."type", coalesce("res_partner"."is_company", false) desc, "res_partner"."display_name", "res_partner"."id"; `
Replacing by `order by "res_partner"."id"` it is faster
Before `Execution Time: 104.256 ms`
Now `Execution Time: 31.802 ms`
So, it is ~4x faster for each query and it is re-using data for the same query using a LRU-Cache locally in the method
Manual Forward-Port-Of: https://github.com/odoo/odoo/pull/164771 since the module was renamed and the python code refactored so the bot was not able to forward-port it automatically from https://github.com/odoo/odoo/pull/166447
Also, i didn't find the part of the partners in this new version
Forward-Port-Of: odoo/odoo#166608Ubuntu Noble (24.04) now provides [python3-websocket 1.7.0](https://packages.ubuntu.com/noble/python3-websocket). The websocket rate limiting tests asserts that an exception occurs when the code 1013 is returned because this code was not supported in [python3-websocket 1.2.3](https://packages.ubuntu.com/jammy/python3-websocket) provided by Ubuntu Jammy (22.04). Support was added in [websocket 1.3.0](https://github.com/websocket-client/websocket-client/commit/a28a016584f82cfca30a09a59ecd764569
Original PR description
Ubuntu Noble (24.04) now provides [python3-websocket 1.7.0](https://packages.ubuntu.com/noble/python3-websocket). The websocket rate limiting tests asserts that an exception occurs when the code 1013 is returned because this code was not supported in [python3-websocket 1.2.3](https://packages.ubuntu.com/jammy/python3-websocket) provided by Ubuntu Jammy (22.04). Support was added in [websocket 1.3.0](https://github.com/websocket-client/websocket-client/commit/a28a016584f82cfca30a09a59ecd764569c2fa3f) With this commit, presence of the status code in the lib is verified and the test is adapted accordingly. Forward-Port-Of: odoo/odoo#166899
VAT should be accounted for on gift card rewards (when necessary). To allow that, we will start considering the taxes set on the reward product. As it is enforced that no taxes are set on that product on creation, we are sure that if a tax is set on the product, it can safely be applied on the reward line. opw-3817604 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164391
Original PR description
VAT should be accounted for on gift card rewards (when necessary). To allow that, we will start considering the taxes set on the reward product. As it is enforced that no taxes are set on that product on creation, we are sure that if a tax is set on the product, it can safely be applied on the reward line. opw-3817604 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#164391
Current behaviour before commit: When background color is applied on text, the text becomes somewhat invisible in dark mode. Desired behaviour after commit: Now, when background color is applied on text, opacity of 60% is applied to the color. Due to this text becomes somewhat visible. task-3273315 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166325 Forward-Port-Of: odoo/odoo#129700
Original PR description
Current behaviour before commit: When background color is applied on text, the text becomes somewhat invisible in dark mode. Desired behaviour after commit: Now, when background color is applied on text, opacity of 60% is applied to the color. Due to this text becomes somewhat visible. task-3273315 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166325 Forward-Port-Of: odoo/odoo#129700
Steps: - Create a database on SaaS - Activate debug mode - Load demo data if not enabled - Install one of the module that use this template Actual result: - Module X installed - Demo data not loaded properly, traceback Expected result - Module X installed - Demo data loaded Initial PR on enterprise: https://github.com/odoo/enterprise/pull/63328 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167696
Original PR description
Steps: - Create a database on SaaS - Activate debug mode - Load demo data if not enabled - Install one of the module that use this template Actual result: - Module X installed - Demo data not loaded properly, traceback Expected result - Module X installed - Demo data loaded Initial PR on enterprise: https://github.com/odoo/enterprise/pull/63328 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167696
Issue: ====== list doesn't appear in quick edit of html_field Steps to reproduce the issue: ============================= - Go to any sale order - Send by email - Add a list inside the email - It doesn't appear Origin of the issue: ==================== Most of the templates have hardcoded `padding = 0px`, so when we convert a `p` element to a `ul` or `ol` element it will have have the same styling and we loose the default padding for the list elements. Solution: ========= We
Original PR description
Issue: ====== list doesn't appear in quick edit of html_field Steps to reproduce the issue: ============================= - Go to any sale order - Send by email - Add a list inside the email - It doesn't appear Origin of the issue: ==================== Most of the templates have hardcoded `padding = 0px`, so when we convert a `p` element to a `ul` or `ol` element it will have have the same styling and we loose the default padding for the list elements. Solution: ========= We set the padding as null to remove any forced padding used. opw-3900433 Forward-Port-Of: odoo/odoo#165773
Purpose ======= Fix the session chart labels which were disappearing when zooming on the chart. Specification ============= When zooming, the chart x axis ticks were skipped / hidden leading to the labels disappearance. Fixing the issue by preventing the x axis ticks from being skipped. Task-3918382 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166462
Original PR description
Purpose ======= Fix the session chart labels which were disappearing when zooming on the chart. Specification ============= When zooming, the chart x axis ticks were skipped / hidden leading to the labels disappearance. Fixing the issue by preventing the x axis ticks from being skipped. Task-3918382 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#166462
When setting `l10n_it_has_tax_representative` to False, the field `l10n_it_tax_representative_partner_id` stays set, this leads to inconsistencies when generating the xml on e-invoicing. Steps: - Install l10n_it_edi - Go to the form view of the italian company - On E-invoicing tab, check the `l10n_it_has_tax_representative` field, set `l10n_it_tax_representative_partner` and save - Create and confirm an invoice - Check the xml that has been generated, there is a field `RappresentanteFiscal
Original PR description
When setting `l10n_it_has_tax_representative` to False, the field `l10n_it_tax_representative_partner_id` stays set, this leads to inconsistencies when generating the xml on e-invoicing. Steps: - Install l10n_it_edi - Go to the form view of the italian company - On E-invoicing tab, check the `l10n_it_has_tax_representative` field, set `l10n_it_tax_representative_partner` and save - Create and confirm an invoice - Check the xml that has been generated, there is a field `RappresentanteFiscale` with `l10n_it_tax_representative_partner` infos - Go back to company form view, uncheck the `l10n_it_has_tax_representative` field and save - Create and confirm an other invoice - Check the xml generated -> The field `RappresentanteFiscale` is still there, it should not be. Fix: Add a compute to `l10n_it_tax_representative_partner` to set it to False when unchecking `l10n_it_has_tax_representative` opw-3947519 Forward-Port-Of: odoo/odoo#166732
Purpose ======= Fix the tooltip header color which wasn't reactive to the theme color (light vs dark theme). The header text is black instead of white in light theme and is thus not visible on the tooltip black background. Specification ============= Overwritting the h5 color style that is set to a dark color by the basic bootstrap style. The border-bottom isn't visible in the dark theme because of the tooltip border color style. This border style is applied to the external border
Original PR description
Purpose ======= Fix the tooltip header color which wasn't reactive to the theme color (light vs dark theme). The header text is black instead of white in light theme and is thus not visible on the tooltip black background. Specification ============= Overwritting the h5 color style that is set to a dark color by the basic bootstrap style. The border-bottom isn't visible in the dark theme because of the tooltip border color style. This border style is applied to the external borders of the tooltip and thus shoudln't be changed. Replacing the border-bottom class by a hr tag as it is more adequate for a divider and its color is independant from the tooltip basic border color. Task-3956309 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#167174
Issue ---- Demo company data contains a phone number of a real person, who receives phone calls from peolple asking to buy stuff :) Steps ---- Number is available on website footer. Cause ---- A real number is used in demo data. opw-3853066 Forward-Port-Of: odoo/odoo#164545
Original PR description
Issue ---- Demo company data contains a phone number of a real person, who receives phone calls from peolple asking to buy stuff :) Steps ---- Number is available on website footer. Cause ---- A real number is used in demo data. opw-3853066 Forward-Port-Of: odoo/odoo#164545
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#156944
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#156944
[FIX] base: Manage list operators for name search Description of the issue/feature this PR addresses: - Searching contact with country state not working if we check in a list. - Not possible to define a domain with "in" for state_id field of res.partner Steps: - Setup a record rule for res.partner - With domain "[('state_id', 'in', ['A', 'B', 'C'])]" - Save Actual result: - Invalid domain: expected string or bytes-like object Expected result: - Domain is saved - List values h
Original PR description
[FIX] base: Manage list operators for name search
Description of the issue/feature this PR addresses:
- Searching contact with country state not working if we check in a list.
- Not possible to define a domain with "in" for state_id field of res.partner
Steps:
- Setup a record rule for res.partner
- With domain "[('state_id', 'in', ['A', 'B', 'C'])]"
- Save
Actual result:
- Invalid domain: expected string or bytes-like object
Expected result:
- Domain is saved
- List values handle "display_name" searching too
opw-3830039
odoo/odoo@aacd64a1
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#167725
Forward-Port-Of: odoo/odoo#159424Steps to reproduce: 1) Create product P for $1000, with 15% Tax, publish to website. 1-bis) make sure the 15% tax is "included" 2) Settings -> search 'price' -> Tax Excluded. 3) Go to website /shop page, and edit to place the Products block, and search for Issue: The price displayed on the product in "86.96" (correct) but the price on the product in the carousel displays "100.00" Cause: The price for the carousel is not fetched the same way https://github.com/odoo/odoo/blob/e829b345f0
Original PR description
Steps to reproduce: 1) Create product P for $1000, with 15% Tax, publish to website. 1-bis) make sure the 15% tax is "included" 2) Settings -> search 'price' -> Tax Excluded. 3) Go to website /shop page, and edit to place the Products block, and search for Issue: The price displayed on the product in "86.96" (correct) but the price on the product in the carousel displays "100.00" Cause: The price for the carousel is not fetched the same way https://github.com/odoo/odoo/blob/e829b345f0f5e5346be416b8354c29fa9acb74a7/addons/website_sale/data/product_snippet_template_data.xml#L388 And the method does not take into account this fourth scenario. That is: - a tax with price_include set to True - a show_line_subtotals_tax_selection config parameter set to "tax_excluded" opw-3370999 Forward-Port-Of: odoo/odoo#136091 Forward-Port-Of: odoo/odoo#133501
The Early Payment Discount (EPD) functionality is designed to work only with payment terms that include a single 100% line. A validation error is correctly displayed if a user attempts to create an EPD with multiple term lines. However, a bug existed where users could create a regular payment term with multiple lines, save it, and then enable the EPD, bypassing the validation. This allowed the record to be saved without error, leading to a traceback when the system later attempted to process
Original PR description
The Early Payment Discount (EPD) functionality is designed to work only with payment terms that include a single 100% line. A validation error is correctly displayed if a user attempts to create an EPD with multiple term lines. However, a bug existed where users could create a regular payment term with multiple lines, save it, and then enable the EPD, bypassing the validation. This allowed the record to be saved without error, leading to a traceback when the system later attempted to process the EPD, as it does not support multiple term lines. opw-3945596 Forward-Port-Of: odoo/odoo#167732