Friday, January 17, 2025
26 changes · saas-18.1
Resolved issues and error corrections
This fixes a missed server address handoff in the IoT Box connection check. It helps ensure hardware-related features can correctly verify and use the connected Odoo server without avoidable connection errors.
Original PR description
In odoo/odoo#193082, we introduced a decorator to check if a database is connected to the IoT Box. This decorator also injects the server url into the callee if it expects it. As we missed one injection, this commit fixes it.
This fixes an internal validation issue that could create warning messages when updating unit-of-measure relationships in inventory products. It keeps the intended protection in place while avoiding unnecessary log noise and removes an obsolete check for a deleted field.
Original PR description
Currently the write will check if uom.relative_uom_id != int, which will throw a UserWarning: unsupported operand type(s) for "==": 'uom.uom()' == '8' whenever `relative_uom_id` was written to. Although this error is only show via the log, it's best to not have it at all + we should probably properly enforce the check. Also, remove `category_id` from the `keys_to_protect` since it was deleted anyways. Followup to task: 4252043 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a small issue where restaurant preparation displays used the wrong table information. Orders should now show the intended table number, helping staff identify where prepared items need to go.
Original PR description
Fix preparation wrong variable name. `table_name` -> `table.table_number`
Miscellaneous changes
Currently when users have too many categories in their pos, their are not able to see the products and cannot scroll. Steps to reproduce: ------------------- * Add categories to the pos `> 100` * Open pos shop > Observation: We cannot see all categories, cannot scroll through them, and cannot see/select products Why the fix: ------------ This issue is the same as the one in this commit: https://github.com/odoo/odoo/commit/dd14967a037a93346123265ed489a0b4ce5f8218 But this time w
Original PR description
Currently when users have too many categories in their pos, their are not able to see the products and cannot scroll. Steps to reproduce: ------------------- * Add categories to the pos `> 100` * Open pos shop > Observation: We cannot see all categories, cannot scroll through them, and cannot see/select products Why the fix: ------------ This issue is the same as the one in this commit: https://github.com/odoo/odoo/commit/dd14967a037a93346123265ed489a0b4ce5f8218 But this time we expend the scope of the fix because the issue can also appear on other size screens. The number of rows of category displayed depends of the size of the screen. opw-4457772 Forward-Port-Of: odoo/odoo#193164
In odoo/odoo#192449, we removed the only code patch we had on the IoT Box. We can then remove the patching logic. Forward-Port-Of: odoo/odoo#193935
Original PR description
In odoo/odoo#192449, we removed the only code patch we had on the IoT Box. We can then remove the patching logic. Forward-Port-Of: odoo/odoo#193935
### Steps to reproduce: - In the settings enable: 1) Multi-Steps Routes 2) "Batch, Wave and cluster Transfers" - Inventory > Operations > Jobs > Wave transfer - Click on "Prepare Wave". > A read group of the stock.move.line model is performed for you to compose your wave transfer. ### Issue: Move lines without picking are also displayed. Hence if selected raise a traceback during the `_add_to_wave` call. ### Note: The `action_prepare_wave` and `action_prepare_wave_for_picking_typ
Original PR description
### Steps to reproduce: - In the settings enable: 1) Multi-Steps Routes 2) "Batch, Wave and cluster Transfers" - Inventory > Operations > Jobs > Wave transfer - Click on "Prepare Wave". > A read group of the stock.move.line model is performed for you to compose your wave transfer. ### Issue: Move lines without picking are also displayed. Hence if selected raise a traceback during the `_add_to_wave` call. ### Note: The `action_prepare_wave` and `action_prepare_wave_for_picking_type` actions performing the read groups were added to the 18.0 versions by commit 71eeeae5c7212a709c0b18181d195975b5ca6a99 so that there is no issue prior to that version. opw-4464695 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193100
The example of values in the description are translated in other languages. It should not because only the technical values are accepted (which are never translated) It's not needed to backport to 16.0 because function description were not translated at that time. Task: 4471424 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/
Original PR description
The example of values in the description are translated in other languages. It should not because only the technical values are accepted (which are never translated) It's not needed to backport to 16.0 because function description were not translated at that time. Task: 4471424 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#193350 Forward-Port-Of: odoo/odoo#193205
### Issue: Since 57b8b2487def43a1b9c461c0fa4eb02200b5c1ef (18.0), the return picking wizard sets a default quantity of 0. This fits the new design of returns that are no longer exclusively tied to the initial delivery. However, in workflows where you are expected to return all/almost all products of a consequent picking this is both fastidious and error prone to set all the quantities to match the delivered values by hand. ### Solution: We add a "Return All" button in the wizard view to
Original PR description
### Issue: Since 57b8b2487def43a1b9c461c0fa4eb02200b5c1ef (18.0), the return picking wizard sets a default quantity of 0. This fits the new design of returns that are no longer exclusively tied to the initial delivery. However, in workflows where you are expected to return all/almost all products of a consequent picking this is both fastidious and error prone to set all the quantities to match the delivered values by hand. ### Solution: We add a "Return All" button in the wizard view to allow the user to create a return whose quantity matches the delivered quantities. opw-4416167 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192509
When computing an invoice name placeholder dynamically the sequence used depends on the fiscal year end date but it does not account for february 29 on non-leap years, which is a [valid](https://github.com/odoo/odoo/blob/893b253644159a70d1916e3eaf25d1c8af4e92c3/addons/account/models/company.py#L294-L298) date. Here an adjustment for the day is added to safely compare a date with the fiscalyear end. Description of the issue/feature this PR addresses: Current behavior before PR: Desired
Original PR description
When computing an invoice name placeholder dynamically the sequence used depends on the fiscal year end date but it does not account for february 29 on non-leap years, which is a [valid](https://github.com/odoo/odoo/blob/893b253644159a70d1916e3eaf25d1c8af4e92c3/addons/account/models/company.py#L294-L298) date. Here an adjustment for the day is added to safely compare a date with the fiscalyear end. 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#193924
Steps to reproduce: 1. In elearning get a current course or create a new one. 2. Add or just reorder some of the slides/sections. 3. Duplicate the course. After the changes applied to improve the batch call of copy in https://github.com/odoo/odoo/commit/4ac2702c31f0e95f33f9ad554e7350bef9dab8bd the values that we get after the copy are ordered by id instead of preserving the original order, so for this case we can make sure to reorder the values and mantain the proper sequence when duplic
Original PR description
Steps to reproduce: 1. In elearning get a current course or create a new one. 2. Add or just reorder some of the slides/sections. 3. Duplicate the course. After the changes applied to improve the batch call of copy in https://github.com/odoo/odoo/commit/4ac2702c31f0e95f33f9ad554e7350bef9dab8bd the values that we get after the copy are ordered by id instead of preserving the original order, so for this case we can make sure to reorder the values and mantain the proper sequence when duplicating inside copy_data(). opw-4240873 Forward-Port-Of: odoo/odoo#188333
Fixes an issue where splitting an order line with a decimal quantity (e.g., 2.5) would cause indefinite increments in the split bill screen. This adds a check to ensure the split quantity does not exceed the original order line quantity. task-id: 4461861 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
Fixes an issue where splitting an order line with a decimal quantity (e.g., 2.5) would cause indefinite increments in the split bill screen. This adds a check to ensure the split quantity does not exceed the original order line quantity. task-id: 4461861 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#193514
If you create a pricelist rule with a discount that has a valid date range, that discount is only applied if the SO was created in that range. Even if it is confirmed within the valid date range. Fix: For website_sale orders we consider the date to be the current time when computing the price. opw-4375643 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192858 Forward-Port-Of: odoo/odoo#191538
Original PR description
If you create a pricelist rule with a discount that has a valid date range, that discount is only applied if the SO was created in that range. Even if it is confirmed within the valid date range. Fix: For website_sale orders we consider the date to be the current time when computing the price. opw-4375643 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192858 Forward-Port-Of: odoo/odoo#191538
Before this commit, when a time off request based on extra hours was set to draft, a new overtime record with negative duration was created. This commit makes sure that the record is only created when the time off request is in the state confirm or validate. task-4096548 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192166 Forward-Port-Of: odoo/odoo#185962
Original PR description
Before this commit, when a time off request based on extra hours was set to draft, a new overtime record with negative duration was created. This commit makes sure that the record is only created when the time off request is in the state confirm or validate. task-4096548 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192166 Forward-Port-Of: odoo/odoo#185962
When the private key has an issue if we attempt to sing an invoice we may get a traceback in the frontend. We can instead show an error and include the key that's failing. Example traceback if the key is invalid: ``` File "/home/odoo/src/odoo/18.0/addons/certificate/models/key.py", line 206, in _sign_with_key private_key = serialization.load_pem_private_key(base64.b64decode(pem_key), pwd) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/li
Original PR description
When the private key has an issue if we attempt to sing an invoice we may get a traceback in the frontend. We can instead show an error and include the key that's failing. Example traceback if the…
When the private key has an issue if we attempt to sing an invoice we may get a traceback in the frontend. We can instead show an error and include the key that's failing.
Example traceback if the key is invalid:
```
File "/home/odoo/src/odoo/18.0/addons/certificate/models/key.py", line 206, in _sign_with_key
private_key = serialization.load_pem_private_key(base64.b64decode(pem_key), pwd)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/base64.py", line 83, in b64decode
s = _bytes_from_decode_data(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/base64.py", line 45, in _bytes_from_decode_data
raise TypeError("argument should be a bytes-like object or ASCII "
TypeError: argument should be a bytes-like object or ASCII string, not 'bool'
```
Steps to reproduce:
1. Install l10n_sa_edi
3. Alter the key in a way that makes it fail to load, e.g. upload a garbage text file as a key (note the error in the warning)
2. Make an invoice to ARAMCO partner
4. Click in the `Process now` link at the top of the invoice
We get the traceback.
This issue was seen during upgrades due to improper migration of SA keys (already solved). Still the UX here is suboptimal. This patch proposes to show an error that can help users understand the issue. We already show the error in the keys management interface, but the user working in invoices may be unaware of the issue with the key.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#193931_* = website_crm, website_project, website_hr_recruitment - This commit reverts [#128964 ](https://github.com/odoo/odoo/pull/128964)because the feature has been made in generic instead of doing it in project and helpdesk which is caused some issues in other models using website form feature. Also, the feature adds more complexity to just add a warning in the task description and in a message linked to the task generated to notify the user the task has been generated from an external submiss
Original PR description
_* = website_crm, website_project, website_hr_recruitment - This commit reverts [#128964 ](https://github.com/odoo/odoo/pull/128964)because the feature has been made in generic instead of doing it in project and helpdesk which is caused some issues in other models using website form feature. Also, the feature adds more complexity to just add a warning in the task description and in a message linked to the task generated to notify the user the task has been generated from an external submission (when the email set in the website form is not the one set on the user who submits the form) since the feature used the email set to search the partner to set on the task. task-4295363 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193823 Forward-Port-Of: odoo/odoo#192322
The issue: When a vendor has multiple prices for two companies (A and B), and the purchase order's company is set to B (while the user's main company is A), the price incorrectly defaults to the main company A's price. How to reproduce the issue: 1) Create a new product with 2 vendor pricelist records that have different "Unit Prices" under the "Purchase" tab of the product -> each pricelist record should belong to a different company 2) Create an RFQ for this product with both of these
Original PR description
The issue: When a vendor has multiple prices for two companies (A and B), and the purchase order's company is set to B (while the user's main company is A), the price incorrectly defaults to the main…
The issue: When a vendor has multiple prices for two companies (A and B), and the purchase order's company is set to B (while the user's main company is A), the price incorrectly defaults to the main company A's price. How to reproduce the issue: 1) Create a new product with 2 vendor pricelist records that have different "Unit Prices" under the "Purchase" tab of the product -> each pricelist record should belong to a different company 2) Create an RFQ for this product with both of these companies active 3) Change the "Company" on the PO under the "Other Information" tab to the company that is NOT shown in the top right-hand corner, but is still selected 4) Add the product to the RFQ order line - The "Unit Price" will be pulled from the main company shown in the top-right hand corner, thereby ignoring the "Company" selected for the PO. After this commit, the price from the purchase order's company (B) is prioritized over the main company (A). opw-4347134 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192918 Forward-Port-Of: odoo/odoo#189272
Description of the issue this PR addresses: I. Commit [1] handled cases of pressing enter at the edge of an anchor, which is a child of an unbreakable element. The commit inserted the `br`'s after anchors; however, it missed the situation where the anchor tags are block elements nested inside an unbreakable element inside a `li`. In this specific case, inserting two `br` tags after a anchor block resulted in the creation of two new lines. This PR handles that case by only inserting one `
Original PR description
Description of the issue this PR addresses: I. Commit [1] handled cases of pressing enter at the edge of an anchor, which is a child of an unbreakable element. The commit inserted the `br`'s after…
Description of the issue this PR addresses: I. Commit [1] handled cases of pressing enter at the edge of an anchor, which is a child of an unbreakable element. The commit inserted the `br`'s after anchors; however, it missed the situation where the anchor tags are block elements nested inside an unbreakable element inside a `li`. In this specific case, inserting two `br` tags after a anchor block resulted in the creation of two new lines. This PR handles that case by only inserting one `br` tag after the anchor, rather than both. II. Previously when changing selection between links in website, when clicking on a link the previous link used to get selected. This commit makes sure that when changing selection in between links it selects the correct link. III. This PR ensures that the link popover closes when the cursor moves outside the link. [1]: https://github.com/odoo/odoo/commit/df6f8dd0c54c40ea7edbd3821ae068d79b1b7af7 task-3631910 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192761 Forward-Port-Of: odoo/odoo#171469
Under Japan’s Qualified Invoice System, which took effect in October 2023, the consumption tax amount should be calculated and rounded based on the total invoice amount for each tax rate, rather than on an item-by-item basis. See https://www.pwc.com/jp/en/taxnews/pdf/jtu-20221111-en.pdf @qrtl --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193522
Original PR description
Under Japan’s Qualified Invoice System, which took effect in October 2023, the consumption tax amount should be calculated and rounded based on the total invoice amount for each tax rate, rather than on an item-by-item basis. See https://www.pwc.com/jp/en/taxnews/pdf/jtu-20221111-en.pdf @qrtl --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#193522
Steps: • Install the Employee referral App. • Open the app for the first time. You will see buttons labeled Skip, and Start Now. When you click on any of these buttons, there is a noticeable blank screen for a moment during the transition. • Tap on the User Icon within the app interface. A blank screen appears momentarily before the next screen is displayed. • When you select an icon for a friend, the same issue occurs: a blank screen is displayed for a moment during the transiti
Original PR description
Steps: • Install the Employee referral App. • Open the app for the first time. You will see buttons labeled Skip, and Start Now. When you click on any of these buttons, there is a noticeable blank screen for a moment during the transition. • Tap on the User Icon within the app interface. A blank screen appears momentarily before the next screen is displayed. • When you select an icon for a friend, the same issue occurs: a blank screen is displayed for a moment during the transition. Cause: • The issue occurred because, for all the above actions, the target was set to 'main,' which caused a blank component to appear for a moment during transitions. Fix: • If we do not want to show the blank component then either the clearBreadcrumbs set to false or noEmptyTransition should be true.(refer the action_service.js) • Here i have set noEmptyTransition to true. task-4320099 Forward-Port-Of: odoo/enterprise#74955
Steps to reproduce: - Create a spreadsheet - click on the the Share button - add a portal user (Joel Willis) to the allowed users - connect as the portal user and open his portal - go to the Documents section and try opening the spreadsheet => You are not allowed to access 'Spreadsheet Contributor' (spreadsheet.contributor) records. Task: 4453298 Forward-Port-Of: odoo/enterprise#76531
Original PR description
Steps to reproduce: - Create a spreadsheet - click on the the Share button - add a portal user (Joel Willis) to the allowed users - connect as the portal user and open his portal - go to the Documents section and try opening the spreadsheet => You are not allowed to access 'Spreadsheet Contributor' (spreadsheet.contributor) records. Task: 4453298 Forward-Port-Of: odoo/enterprise#76531
The commit fixes the commit[[1]] that optimizes the cron activation logic. Before this fix, only admin users could run the manual fetch, it was wrong and we need to authorize all the users that have access to the bank sync to active/deactivate this cron by using the manual fetch. opw-4477366 [1]: https://github.com/odoo/enterprise/commit/bc3b9136d4d62fbc1d09267f73cac7ca29f1ba3a Forward-Port-Of: odoo/enterprise#77148
Original PR description
The commit fixes the commit[[1]] that optimizes the cron activation logic. Before this fix, only admin users could run the manual fetch, it was wrong and we need to authorize all the users that have access to the bank sync to active/deactivate this cron by using the manual fetch. opw-4477366 [1]: https://github.com/odoo/enterprise/commit/bc3b9136d4d62fbc1d09267f73cac7ca29f1ba3a Forward-Port-Of: odoo/enterprise#77148
This commit fixes an issue with the sharing functionality of the error dialogs where if multiple of these were stacked onto each other, the share button would trigger the URL copy and notification for all errors instead of only the relevant one. Forward-Port-Of: odoo/enterprise#77263
Original PR description
This commit fixes an issue with the sharing functionality of the error dialogs where if multiple of these were stacked onto each other, the share button would trigger the URL copy and notification for all errors instead of only the relevant one. Forward-Port-Of: odoo/enterprise#77263
* is l10n_{au,be,ch,hk,lu,ma,us}_hr_payroll - When miltiple companies it shows `X Localization` block only in payroll settings Where X is the cuntry of the current chosien company Task: 4409568 Forward-Port-Of: odoo/enterprise#76584 Forward-Port-Of: odoo/enterprise#75683
Original PR description
* is l10n_{au,be,ch,hk,lu,ma,us}_hr_payroll
- When miltiple companies it shows `X Localization` block only in payroll settings Where X is the cuntry of the current chosien company
Task: 4409568
Forward-Port-Of: odoo/enterprise#76584
Forward-Port-Of: odoo/enterprise#75683task-4295363 Forward-Port-Of: odoo/enterprise#77200 Forward-Port-Of: odoo/enterprise#76449
Original PR description
task-4295363 Forward-Port-Of: odoo/enterprise#77200 Forward-Port-Of: odoo/enterprise#76449
The fields start_date and next_invoice_date of sale.order can be null. We only want to compare to dates. So its better to check that the dates are not null before comparing them. Forward-Port-Of: odoo/enterprise#76920
Original PR description
The fields start_date and next_invoice_date of sale.order can be null. We only want to compare to dates. So its better to check that the dates are not null before comparing them. Forward-Port-Of: odoo/enterprise#76920
_compute_l10n_in_transaction_type fetches all columns of account_move but we need only few columns. And account_move table is usually large in client database which can lead to memory_error. The database in question has: ``` select COUNT(*) from account_move +---------+ | count | |---------| | 3447401 | +---------+ ``` Forward-Port-Of: odoo/enterprise#76502
Original PR description
_compute_l10n_in_transaction_type fetches all columns of account_move but we need only few columns. And account_move table is usually large in client database which can lead to memory_error. The database in question has: ``` select COUNT(*) from account_move +---------+ | count | |---------| | 3447401 | +---------+ ``` Forward-Port-Of: odoo/enterprise#76502