Daily updates from Odoo
Wednesday, August 19, 2026
4 changes · 19.0
Resolved issues and error corrections
This fix prevents an error when creating DHL return labels for sales orders that include incoterms. The system now sends the correct incoterm code to DHL, allowing delivery confirmation and return label generation to complete normally.
Original PR description
Issue ----- When "return" is enabled, users get a traceback if the SO has incoterms. Steps to reproduce ----- - Set up DHL - enable return labels - Create a SO with incoterms & confirm it - Confirm the delivery > Traceback Cause ----- The request sent for the return label contains the incoterm record instead of its' code like in `dhl_rest_send_shipping` https://github.com/odoo/enterprise/blob/f6c94d4ca3ef4211a5ab00bf0b39f6a7675c8f79/delivery_dhl_rest/models/delivery_dhl.py#L371-L372 Which is not JSON serializable ----- Ticket: opw-6430371
When a product fails a quality check, Odoo now correctly sends it to the selected failure location even if that location is a parent of the planned storage location. This prevents failed goods from being incorrectly recorded as available in their normal shelf location, improving inventory accuracy and quality handling.
Original PR description
Currently, when the user fails a quality check where the failure location is the parent of the location specified in the picking, the product is still moved to the picking location instead of the…
Currently, when the user fails a quality check where the failure location is the parent of the location specified in the picking, the product is still moved to the picking location instead of the failure location.
## Steps to replicate:
- Install Quality
- Go to Settings Enable Storage Locations
- Create a location `Dried Rice Shelf` with parent Location as WH/Stock
- Create a tracked product 'Rice'
- Create a Quality control point with following Configuration:
- Title: Moisture test
- Products: Rice
- Operations: Receipt
- Failure Locations: WH/Stock
- Create a receipt for Rice with:
- Destination location: WH/Stock/Dried Rice Shelf
- Demand: 1
- Mark as Todo > Validate > Fail the quality check > Confirm failure location.
- Check On hand quantity for the rice.
## Observed Behavior:
Even though the user failed the quality check, the rice still ended up in the dried rice shelf. This is incorrect behavior; it should have been sent to WH/Stock.
## Root cause:
The issue occurs when the user presses Fail and confirms the failure location by clicking Confirm.
`confirm_fail` is called, which invokes `_move_to_failure_location` at [1] with the failure location. Since the quality check is of type product, this calls `_move_to_failure_location_product` at [2], which sets the move location's destination to `WH/Stock` at [3].
This triggers the inverse method [4] of `location_dest_id` on stock.move, which updates the destination locations of the stock move lines. However, since Dried Rice Shelf (set on the stock move lines) is already a child location of WH/Stock (set on the stock move), the move line destinations are not updated.
After `_move_to_failure_location` completes, [1] returns `action_generate_next_window`. This calls `button_validate` at [5], which triggers `_action_done` on the `picking → stock.move → stock.move.line`. At [6], the quants/product inventory are synchronized using the destination location from the move line, which is still Dried Rice Shelf, causing the issue.
[1]-
https://github.com/odoo/enterprise/blob/36efa7b0674db4203d9229d5b7ed6452d6178d70/quality_control/wizard/quality_check_wizard.py#L97-L100
[2]-
https://github.com/odoo/enterprise/blob/36efa7b0674db4203d9229d5b7ed6452d6178d70/quality_control/models/quality.py#L524-L527
[3]-
https://github.com/odoo/enterprise/blob/36efa7b0674db4203d9229d5b7ed6452d6178d70/quality_control/models/quality.py#L583-L589
[4]-
https://github.com/odoo/odoo/blob/13e9e827dc21103052e8607d16f23c07adeb5634/addons/stock/models/stock_move.py#L246-L252
[5]-
https://github.com/odoo/enterprise/blob/36efa7b0674db4203d9229d5b7ed6452d6178d70/quality_control/wizard/quality_check_wizard.py#L115-L119
[6]-
https://github.com/odoo/odoo/blob/13e9e827dc21103052e8607d16f23c07adeb5634/addons/stock/models/stock_move_line.py#L696-L700
## Solution:
We also update the location on stock move lines when a quality check is completed. This ensures the failure location is set correctly and prevents failed items from being moved to a passing location. This is especially useful when the parent location is a failure location. For example, we move the rice back to WH/Stock, dry it, and then store it back on the shelf.
opw-6393693Peruvian accounting reports now use the exchange rate already saved on each accounting entry instead of recalculating it during report generation. This avoids small rounding differences and helps produce more reliable report figures.
Original PR description
Previously, the `_get_ple_report_data` method computed the currency rate when called. Since the calculation was based on the entry totals, it was prone to rounding errors. This PR makes it use the rate stored in the entry itself. This should lead to more accurate results. opw-6411322 Forward-Port-Of: odoo/enterprise#126882
Uploading a document with AI-Sort enabled could crash the Documents view when the file was automatically moved to another folder. The update now checks that the uploaded document is still available in the current view before refreshing, keeping the user interface stable.
Original PR description
When a user uploads a document and AI-Sort is turned on, the document can get automatically sorted and moved to a different folder, causing the documents view to crash. The reason for the crash is that the file uploader triggers a renderer refresh with a focus on the newly-uploaded record. However, the new record no longer exists in the current view because it was moved to a new folder. To solve this problem, this commit checks for the existence of the record first before triggering the UI update. task-6304506