Monday, December 30, 2024
19 changes · saas-18.1
Resolved issues and error corrections
This update corrects a small internal issue in Odoo's core data handling logic related to text comparison. It helps prevent errors in affected operations and improves reliability without changing user-facing workflows.
Original PR description
Fine-tunning of d6bf6df 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
**Problem**: Previously, self-closing tags were converted after parsing with `DOMParser`. However, when parsing with the content type `"text/html"`, all self-closing tags are converted to open tags without corresponding closing tags. **Solution**: Convert self-closing tags before parsing to ensure proper handling. **Steps to reproduce**: 1. Open email templates. 2. Open a template containing self-closing tags like `t` (e.g., Sales: Order Confirmation). 3. Observe that the template is
Original PR description
**Problem**: Previously, self-closing tags were converted after parsing with `DOMParser`. However, when parsing with the content type `"text/html"`, all self-closing tags are converted to open tags without corresponding closing tags. **Solution**: Convert self-closing tags before parsing to ensure proper handling. **Steps to reproduce**: 1. Open email templates. 2. Open a template containing self-closing tags like `t` (e.g., Sales: Order Confirmation). 3. Observe that the template is incorrect, with all self-closing tags converted to open but not closed tags. opw-4394833 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191311
When using ship later on a settle order, the qty_delivered on the original order would not take into account if the pos order has been delivered or not. Steps to reproduce: ------------------- * Install pos_sale module * Enable ship later * Create an order with any product * Open the PoS and settle the order * Validate the order and use ship later option > Observation: If you go on the sale order the qty_delivered will be 1 but the order has not been delivered yet. Why the fix: --
Original PR description
When using ship later on a settle order, the qty_delivered on the original order would not take into account if the pos order has been delivered or not. Steps to reproduce: ------------------- * Install pos_sale module * Enable ship later * Create an order with any product * Open the PoS and settle the order * Validate the order and use ship later option > Observation: If you go on the sale order the qty_delivered will be 1 but the order has not been delivered yet. Why the fix: ------------ We make sure that if the pos order is linked to a picking, the picking should be completely done to count the qty as delivered. opw-4199142 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190258 Forward-Port-Of: odoo/odoo#185456
When adding a reward to an order on a table, if you leave the table and come back to it the reward would be gone Steps to reproduce: ------------------- * Setup a promotion program that give 10% discount * Open a PoS restaurant open a table and add some products * The 10% discount should be applied * Leave the table and come back to it > Observation: The reward is gone Why the fix: ------------ We make sure to update the rewards when selecting the table, because when opening the ta
Original PR description
When adding a reward to an order on a table, if you leave the table and come back to it the reward would be gone Steps to reproduce: ------------------- * Setup a promotion program that give 10% discount * Open a PoS restaurant open a table and add some products * The 10% discount should be applied * Leave the table and come back to it > Observation: The reward is gone Why the fix: ------------ We make sure to update the rewards when selecting the table, because when opening the table we use the one saved on the server. opw-4161408 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191444 Forward-Port-Of: odoo/odoo#183949
**Problem**: The product created during the tour test was not explicitly selected. It was selected implicitly because it appeared first in the product list. **Solution**: Explicitly select the product created during the test in the tour to ensure proper functionality and remove dependency on list order. runbot-110904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191593
Original PR description
**Problem**: The product created during the tour test was not explicitly selected. It was selected implicitly because it appeared first in the product list. **Solution**: Explicitly select the product created during the test in the tour to ensure proper functionality and remove dependency on list order. runbot-110904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191593
Before this fix it was not possible to reconcile the stock valuation lines created from PoS as one of them was missing the partner_id Steps to reproduce: ------------------- * Activate automatic stock valuation for the `All` category * Sell a product and ship it later * Close the session and go to the accounting entries > Observation: 2 of them are not reconciled, when clicking on reconcile it was not finding the good one to reconcile with opw-4395468 Forward-Port-Of: odoo/odoo#190
Original PR description
Before this fix it was not possible to reconcile the stock valuation lines created from PoS as one of them was missing the partner_id Steps to reproduce: ------------------- * Activate automatic stock valuation for the `All` category * Sell a product and ship it later * Close the session and go to the accounting entries > Observation: 2 of them are not reconciled, when clicking on reconcile it was not finding the good one to reconcile with opw-4395468 Forward-Port-Of: odoo/odoo#190519
In this commit: === - Ensured that the default sequence defined for POS categories is properly reflected on the product screen in the POS interface. task-4365434 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188934
Original PR description
In this commit: === - Ensured that the default sequence defined for POS categories is properly reflected on the product screen in the POS interface. task-4365434 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188934
Description of the issue this PR addresses: This PR changes the background color of toolbar and link popover dropdown for a smoother UI. task-4356656 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190503
Original PR description
Description of the issue this PR addresses: This PR changes the background color of toolbar and link popover dropdown for a smoother UI. task-4356656 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#190503
Issue 1 --- Trying to validate a receipt related to a landed cost account line for a product using a uom from a different uom category will raise a userError that do not allow you to validate the receipt. ### Steps to reproduce: - Create a product: - real time property valuation - average cost method - on ordered quantities control policy - UOM from an other category han "Unit" e.g. kg - Create and confirm a PO for 100 k units at 1.35 each - Create an invoice for
Original PR description
Issue 1 --- Trying to validate a receipt related to a landed cost account line for a product using a uom from a different uom category will raise a userError that do not allow you to validate the…
Issue 1
---
Trying to validate a receipt related to a landed cost account line for
a product using a uom from a different uom category will raise a
userError that do not allow you to validate the receipt.
### Steps to reproduce:
- Create a product:
- real time property valuation
- average cost method
- on ordered quantities control policy
- UOM from an other category han "Unit" e.g. kg
- Create and confirm a PO for 100 k units at 1.35 each
- Create an invoice for 23 k, receive 23k units and backorder
- Create a landed cost on the invoice for 23k units in the company currency units
- Post the invoice
- Create a second invoice for 27k units and post it
- Try to validate the receipt of the 27k units more units
> UserError: The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure kg > defined on the product.
### Cause of the issue:
Since Commit 32543ce9356f228d087d17a0ead1e0a80449e5de The landed_cost account lines related to a given stock move are also considered in the `_get_price_unit` call of stock moves:
https://github.com/odoo/odoo/blob/1b999e4b358eabe80cb3d636cd7bc348c5b85a1b/addons/purchase_stock/models/stock_move.py#L60
https://github.com/odoo/odoo/blob/1b999e4b358eabe80cb3d636cd7bc348c5b85a1b/addons/stock_landed_costs/models/purchase.py#L11-L16
However, the uom related to the landed cost account line might not match the uom category of the product related to the move. As such, this line will raise a UserError:
https://github.com/odoo/odoo/blob/da1f44c2296486c0267a7bdbbe3a314ada3aa679/addons/purchase_stock/models/stock_move.py#L70
https://github.com/odoo/odoo/blob/da1f44c2296486c0267a7bdbbe3a314ada3aa679/addons/uom/models/uom_uom.py#L223-L227
Issue 2
---
### Steps to reproduce
- Create a product invoiced on ordered quantities
- Create a PO and a bill for it, post the bill
- Receipt half the quantity
- Add a landed cost product on the PO, create a second bill for this landed cost product. Create and validate the landed cost.
- Receipt the second half quantity.
### Issue:
The valuation of the second transfer is too low
### Cause of the Issue 2:
To get the price unit for "on ordered qty" policy, We compute the ratio of already receipt value on already invoiced value:
https://github.com/odoo/odoo/blob/4f6353ec8a7306fbf63e95e8e02248d72f413aa3/addons/purchase_stock/models/stock_move.py#L84
The issue is the receipt value is increase by the landed costs value because the receipt valuation layer is linked to the landed cost valuation layer. But the product invoice line is not linked to the landed costs invoice line. Resulting in a invoice value under valuated.
This commit will ingnore the receipt values coming from landed costs so that the landed costs value will be added to the total invoiced value and not removed from the value here:
https://github.com/odoo/odoo/blob/cfb7a3593c5a4b313bdfd8628fe1b0dfe7e73823/addons/purchase_stock/models/stock_move.py#L72
*if* the landed cost has it's own invoice line.
Revert Commit 32543ce9356f228d087d17a0ead1e0a80449e5de
Authored-by: Whenrow <whe@odoo.com>
Issue 1: opw-4389366
Issue 2: opw-4354498
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#191943
Forward-Port-Of: odoo/odoo#191225pos*: pos_restaurant, pos_preparation_display Before this commit: ============== - Splitting an order caused the loss of ordered and unordered quantity information for the order lines. After this commit: ============== - Ordered and unordered quantity information is preserved for all order lines. - Preparation display quantities remain unaffected. Task - 4114041 Forward-Port-Of: odoo/odoo#191870 Forward-Port-Of: odoo/odoo#179481
Original PR description
pos*: pos_restaurant, pos_preparation_display Before this commit: ============== - Splitting an order caused the loss of ordered and unordered quantity information for the order lines. After this commit: ============== - Ordered and unordered quantity information is preserved for all order lines. - Preparation display quantities remain unaffected. Task - 4114041 Forward-Port-Of: odoo/odoo#191870 Forward-Port-Of: odoo/odoo#179481
Before this commit, even if no foldable link items were present in the navbar of a website header, the function to check if items needed to be hidden was still executed. After this commit, if no foldable items are present in the navbar, the function is not executed. Running the function when no items are present can, in rare cases, cause errors (e.g., starting from version 17.0, if the "sales 1" header template contains no links and the page is zoomed). This is why we addressed this issue
Original PR description
Before this commit, even if no foldable link items were present in the navbar of a website header, the function to check if items needed to be hidden was still executed. After this commit, if no foldable items are present in the navbar, the function is not executed. Running the function when no items are present can, in rare cases, cause errors (e.g., starting from version 17.0, if the "sales 1" header template contains no links and the page is zoomed). This is why we addressed this issue in this commit. opw-4390661 Forward-Port-Of: odoo/odoo#191793 Forward-Port-Of: odoo/odoo#191233
Prevent random runbot error by making sure only the Hand Bag product is available. Forward-Port-Of: odoo/odoo#191590
Original PR description
Prevent random runbot error by making sure only the Hand Bag product is available. Forward-Port-Of: odoo/odoo#191590
Before this commit, proceeding with online payment would cause some issues. This was because a new order was being added when the ReceiptScreen was shown. opw-4432110 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191947
Original PR description
Before this commit, proceeding with online payment would cause some issues. This was because a new order was being added when the ReceiptScreen was shown. opw-4432110 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#191947
**Problem**: After this commit: https://github.com/odoo/odoo/commit/cf8f0ff7ba4bb33425003399bc4e5b33d3d5629a the toolbar is hidden when it overflows (`this.toolbar.classList.toggle('d-none', distToScrollContainer < OFFSET / 2);`). This behavior is not suitable for selections containing elements with a height that exceeds the viewport, as the toolbar becomes inaccessible. **Solution**: Ensure the toolbar is always visible, even when overflowing. In such cases, reposition the toolbar to alig
Original PR description
**Problem**: After this commit: https://github.com/odoo/odoo/commit/cf8f0ff7ba4bb33425003399bc4e5b33d3d5629a the toolbar is hidden when it overflows (`this.toolbar.classList.toggle('d-none',…
**Problem**:
After this commit:
https://github.com/odoo/odoo/commit/cf8f0ff7ba4bb33425003399bc4e5b33d3d5629a the toolbar is hidden when it overflows (`this.toolbar.classList.toggle('d-none', distToScrollContainer < OFFSET / 2);`). This behavior is not suitable for selections containing elements with a height that exceeds the viewport, as the toolbar becomes inaccessible.
**Solution**:
Ensure the toolbar is always visible, even when overflowing. In such cases, reposition the toolbar to align with the top of the selection, providing consistent accessibility.
**Picture before fix**
***top***

***bottom***

**Picture after fix**
***top***

***bottom***

**Steps to reproduce**:
1. Add an image to the editor that overflows the viewport.
2. Select the image.
3. Observe that the toolbar does not appear.
opw-4398551
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#190465Before this commit: ------------------------- Previously, when adding a product and clicking the "+/-" button, the quantity would change to "0" instead of becoming negative. After this commit: ----------------------- After implementing this commit, pressing the +/- button now results in the quantity value changing to negative instead of changing it to 0. task- 4281516 Related PR: https://github.com/odoo/enterprise/pull/73653 Forward-Port-Of: odoo/odoo#185441
Original PR description
Before this commit: ------------------------- Previously, when adding a product and clicking the "+/-" button, the quantity would change to "0" instead of becoming negative. After this commit: ----------------------- After implementing this commit, pressing the +/- button now results in the quantity value changing to negative instead of changing it to 0. task- 4281516 Related PR: https://github.com/odoo/enterprise/pull/73653 Forward-Port-Of: odoo/odoo#185441
**Problem**: Similar to the issue addressed in [this commit](https://github.com/odoo/odoo/pull/191311/commits/9b159179a8d0ad85300bf31d3e1d67d7f1324b14), the `knowledge` module patches `HtmlField` and parses its content. Without this fix, self-closing tags are improperly handled when the `knowledge` module is installed. **Solution**: Apply the same fix to convert self-closing tags into open and closed tags to ensure proper handling in the `knowledge` module. opw-4394833 Forward-Port-Of:
Original PR description
**Problem**: Similar to the issue addressed in [this commit](https://github.com/odoo/odoo/pull/191311/commits/9b159179a8d0ad85300bf31d3e1d67d7f1324b14), the `knowledge` module patches `HtmlField` and parses its content. Without this fix, self-closing tags are improperly handled when the `knowledge` module is installed. **Solution**: Apply the same fix to convert self-closing tags into open and closed tags to ensure proper handling in the `knowledge` module. opw-4394833 Forward-Port-Of: odoo/enterprise#75959
- adapt the `copy_data` to not override the name set by another module Task: 4391527 Forward-Port-Of: odoo/enterprise#75524
Original PR description
- adapt the `copy_data` to not override the name set by another module Task: 4391527 Forward-Port-Of: odoo/enterprise#75524
Export from `account_batch_payment` to CBI's RIBA text file format, so that the customer can upload its requests for payment (bank receipts) to the bank. - New field: `l10n_it_sia_code`: Interbancary identifier given by SIA when signing a CBI contract to start doing Ri.Ba.s - New payment method: `RIBA` - Added the methods to read and write the Ri.Ba. text format, i.e. we are able to read an `example` created with FattureInCloud. - Implemented the flow by taking the data from payments and
Original PR description
Export from `account_batch_payment` to CBI's RIBA text file format, so that the customer can upload its requests for payment (bank receipts) to the bank. - New field: `l10n_it_sia_code`: Interbancary identifier given by SIA when signing a CBI contract to start doing Ri.Ba.s - New payment method: `RIBA` - Added the methods to read and write the Ri.Ba. text format, i.e. we are able to read an `example` created with FattureInCloud. - Implemented the flow by taking the data from payments and calling the export functions. - Built a test - Made some demo data - Added translation strings - Riba sequence number, it's created on export and persisted on the batch payment at the moment, so if you re-export, it won't change. It's not shown to the user though. Do we want that to be shown? Editable? Task [link](https://www.odoo.com/odoo/project/967/tasks/4254966) task-4254966 Forward-Port-Of: odoo/enterprise#76149 Forward-Port-Of: odoo/enterprise#74097
Remove patches around tax calculations. Use the accounting calculations natively. As a result, there will be a limitation to use the `l10n_it_pos` properly. The taxes should be price-included when selling products in pos, otherwise, the system's calculations will deviate from the connected fiscal printer's calculations. The accounting team is looking for a native solution to make the fiscal printer work with price-excluded taxes. A workaround for the limitation is to introduce pricelist and f
Original PR description
Remove patches around tax calculations. Use the accounting calculations natively. As a result, there will be a limitation to use the `l10n_it_pos` properly. The taxes should be price-included when selling products in pos, otherwise, the system's calculations will deviate from the connected fiscal printer's calculations. The accounting team is looking for a native solution to make the fiscal printer work with price-excluded taxes. A workaround for the limitation is to introduce pricelist and fiscal position. The pricelist maps the originally tax-excluded price to tax-included price, and the fiscal position maps the price-excluded tax to price-included equivalent. Forward-Port-Of: odoo/enterprise#75426