Tuesday, April 9, 2024
27 changes
Resolved issues and error corrections
This fix corrects an issue where inventory quantities were being recorded in incorrect locations when processing subcontracted purchase orders. When a destination location was changed during receipt processing, the system was incorrectly updating the subcontractor's location, causing inventory to appear in vendor locations instead of the intended warehouse locations. The fix ensures that subcontractor location assignments are preserved during the order fulfillment process.
Original PR description
**Steps to reproduce:** - Install mrp and purchase - Go to "Inventory / Configuration / Settings" - Activate "Storage Locations" - Go to "Inventory / Configuration / Warehouse Management / Operations…
**Steps to reproduce:**
- Install mrp and purchase
- Go to "Inventory / Configuration / Settings"
- Activate "Storage Locations"
- Go to "Inventory / Configuration / Warehouse Management / Operations Types"
- Edit "Receipts" type by activating "Show Detailed Operations"
- Go to "Manufactoring / Configuration / Settings"
- Activate "Subcontracting"
- Create product: (e.g. Product XYZ)
* Product Type: Storable Product
- Create a BoM for Product XYZ:
* BoM Type: Subcontracting
* Subcontractors: [any] (e.g. Azure Interior)
- Create a PO:
* Vendor: Azure Interior
* Products: 2 x Product XYZ
- Confirm the PO
- Open the picking from PO via the Receipt smart button
- In "Operations" tab, set done to 1
- On the picking form, change the destination location (e.g. WH/Stock/Shelf1)
- Save
- In "Detailed Operations" tab, a line should have appeared
- Select the same destination location on that line (i.e. WH/Stock/Shelf1)
- Validate the picking and create a backorder for the remaining quantity to produce
- Go to "Inventory / Reporting / Locations"
- Check the locations of Product XYZ (Search Product: XYZ - Group by: Location)
=> The "On Hand Quantity" for Product XYZ is as followed:
* Virtual Locations/Production: -1.00 (correct)
* WH/Stock/Shelf1: 1.00 (correct)
- Open the backorder picking from PO via the Receipt smart button
- Record the production of the remaining unit
- Validate the picking
- Go to "Inventory / Reporting / Locations"
- Check the locations of Product XYZ
**Issue:**
The "On Hand Quantity" for Product XYZ is as followed:
* Partners/Vendors: -1.00 (incorrect, it should be empty)
* Physical Locations/Subcontracting Location: 1.00 (incorrect, it should be 0.00)
* Virtual Locations/Production: -2.00 (correct)
* WH/Stock/Shelf1: 2.00 (correct)
**Cause:**
When the PO is confirmed, the stock picking and the stock move are created, they both have the same source and destination locations.
However, in an overridden method from "mrp_subcontracting" module, a check is performed on the move to determine if it is a subcontract.
If it is the case, its source location is set to the subcontractor location and so, the source location of the picking and the move is not the same anymore.
When the destination location is changed on the picking, an onchange is triggering an update of the destination location AND the source location of the move to the values coming from the picking, erasing the subcontractor location set on the move.
The issue only happens for the backorder, because the source location update is not propagated to the stock move lines.
In the case of the original picking, the move lines were already created with the subcontractor location as source location.
But when the backorder is created, the move lines are created with the values coming from a move without the subcontractor location.
**Solution:**
Do not propagate "location_id" from the picking to the subcontracting moves.
opw-3777379
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#160970
Forward-Port-Of: odoo/odoo#158442This update corrects how website metadata displays the site name in social media previews. Previously, the site name was incorrectly showing the company name instead of the actual website name, which caused problems for businesses running multiple websites. Now the correct site name will appear when content is shared on social media platforms.
Original PR description
This commit fixes the 'og:site_name' metadata, which previously defaulted to the company name (see [1]), causing issues for multi-site setups. Now, the metadata actually uses the site name. Steps to reproduce: - Navigate to any page - Right-click and select "View Page Source" - In the <head> section, observe the meta property "og:site_name" set to "MyCompany". [1]: https://github.com/odoo/odoo/commit/156955de6b4e6288ac606d29b843081842154eff opw-3791082 Forward-Port-Of: odoo/odoo#160454