Odoo SaaS-14中如何通过产品表单Request Procurement按钮实现WH2至WH1库存调拨?
Hey there, let's break down how to set up this exact procurement flow you're looking for in Odoo SaaS-14. I've walked through similar setups before, so here's a step-by-step guide to make it work:
1. First, Create a Transit Location
You'll need a dedicated transit location to act as the middle step in your transfer:
- Navigate to
Inventory > Configuration > Locations - Click
Createto make a new location (e.g., name itWH Transit) - Set the Location Type to
Transit Location, and set its parent toVirtual Locations - Save the location
2. Build Your Custom Route (WH2 → WH1 via Transit)
This route will tie together all the rules for your transfer flow:
- Go to
Inventory > Configuration > Routes - Click
Create, name it something clear likeWH2 to WH1 via Transit - Check the
Activebox, and choose whether to apply it to all products or specific ones (viaApply to All Productsor leave it unchecked to assign per product later) - Save the route
3. Add a Procurement Rule to Trigger WH2 → Transit Delivery
This rule tells Odoo to generate a delivery order from WH2 to the transit location when a procurement request is made for WH1:
- Open your new route, switch to the
Procurement Rulestab, then clickCreate - Configure these key fields:
- Location: Select
WH1(this is the location where you're requesting stock) - Location Procurement: Select
WH2(the source of the stock) - Route: Link it to your
WH2 to WH1 via Transitroute - Action: Choose
Move To Another Location - Destination Location: Pick the
WH Transitlocation you created earlier - Propagate: Check this box (critical for triggering the subsequent push rule automatically)
- Location: Select
- Save the procurement rule
4. Add a Push Rule for Transit → WH1 Transfer
Once the WH2→Transit delivery is confirmed, this rule will auto-trigger the final transfer to WH1:
- Stay in your route, switch to the
Push Rulestab, clickCreate - Configure these fields:
- Location Source: Select
WH Transit - Location Destination: Select
WH1 - Route: Link to the same
WH2 to WH1 via Transitroute - Operation: Choose
Transfer(match this to your standard inventory transfer operation type) - Trigger: Select
After Operation(this ensures it fires once the transit delivery is validated)
- Location Source: Select
- Save the push rule
5. Enable the Route on Your Target Product
Make sure the product you want to transfer uses this route:
- Open the product form, go to the
Inventorytab - In the
Routesfield, add yourWH2 to WH1 via Transitroute - Save the product
6. Test the "Request Procurement" Button
Now let's verify the flow works:
- Open the product form, click the
Request Procurementbutton - In the pop-up window, set Location to
WH1and enter the quantity you want to transfer - Confirm the procurement request—Odoo will generate a delivery order from WH2 to WH Transit
- Open that delivery order, click
Validateto complete the stock issue from WH2 - Immediately, you'll see a new transfer order generated from WH Transit to WH1
- Validate that final transfer, and your stock will be moved from WH2 to WH1 through transit as expected
Quick Troubleshooting Tips
- If the Transit→WH1 transfer doesn't auto-generate: Double-check that
Propagateis enabled on your procurement rule, and the push rule'sTriggeris set toAfter Operation - If no delivery order is created from procurement request: Ensure the product is linked to your custom route, and your procurement rule's
Location(WH1) andLocation Procurement(WH2) aren't reversed - If the procurement request is stuck waiting: Confirm WH2 has enough on-hand stock to fulfill the request
内容的提问来源于stack exchange,提问作者flyingL123

