Understanding Procurement in Stock Requests
When a stock request is confirmed, the system triggers the Odoo procurement engine:Procurement Creation
The stock request creates a procurement with:
- Product and quantity requested
- Destination location
- Expected date
- Selected route (if any)
Rule Matching
The procurement engine finds applicable rules based on:
- Route selection
- Product configuration
- Location hierarchy
- Warehouse configuration
Action Execution
Matched rules execute their configured action:
- Create stock moves (pull/push)
- Generate purchase orders (buy)
- Create manufacturing orders (manufacture)
Procurement Values Prepared by Stock Requests
Stock requests pass specific values to the procurement engine:These values are passed to the procurement group’s
run() method and eventually to _get_stock_move_values() in stock rules.Stock Move Allocation
The Stock Request module extends stock rules to create allocations:Every stock move created by a procurement rule for a stock request automatically gets a linked allocation record.
Configuring Routes
Route Basics
Routes define procurement paths and can be:Warehouse Routes
Associated with specific warehouses and automatically available for those locations
Product Routes
Assigned to specific products and available wherever those products are requested
Global Routes
Available for all products and locations without restrictions
Manual Routes
Must be explicitly selected on stock requests
Creating a Transfer Route
Create New Route
Click Create and enter:
- Name: Descriptive name (e.g., “Resupply from Warehouse”)
- Company: Select the company
- Warehouse: Select the warehouse(s) this route applies to
Add Rule
In the Rules tab, click Add a line and configure:
- Name: Rule description (e.g., “Transfer to Shop Floor”)
- Action: Select “Pull From”
- Operation Type: Select the internal transfer type
- Source Location: Where products will be pulled from
- Destination Location: Where products will be moved to
- Procure Method:
- “Take From Stock” if source should have stock
- “Make To Order” to trigger further procurement
Example: Multi-Step Transfer Route
To set up a route that moves products through multiple locations:When this route is used, a stock request for the Shop Floor will create two pickings: one from Main Stock to Quality Control, and another from Quality Control to Shop Floor.
Route Selection Logic
Stock requests determine available routes based on several factors:Warehouse-Based Routes
Location Hierarchy Matching
Routes are available only if at least one rule’s destination location matches:- The exact request location
- A parent location in the hierarchy
The
get_parents() method traverses the location tree upward to find all parent locations:Purchase Integration
When the Stock Request Purchase module is installed, stock requests can trigger purchase orders.Configuring Buy Routes
Configure Supplier on Product
Go to Inventory > Products > Products, open the product, and add a vendor in the Purchase tab.
Purchase Rule Behavior
The purchase integration extends stock rules:Automatic PO Creation
Confirming a stock request with a buy route creates a purchase order
PO Linking
Purchase order lines are linked to stock requests for traceability
Smart Buttons
View purchase orders directly from the stock request form
Cancellation Propagation
Cancelling a stock request can cancel draft purchase orders
Viewing Purchase Orders
Click Purchase Orders Button
Click the Purchase Orders smart button (visible when purchase integration is active).
Manufacturing Integration
When the Stock Request MRP module is installed, stock requests can trigger manufacturing orders.Configuring Manufacturing Routes
Configure Bill of Materials
Create a Bill of Materials (BoM) for the product in Manufacturing > Products > Bills of Materials.
Enable Manufacture Route
In the product form, go to Inventory tab and check Manufacture under Routes.
Manufacturing Order Tracking
Manufacturing orders created from stock requests are linked via a many-to-many relationship, allowing multiple production orders to fulfill a single request (e.g., split across production runs).
Using Available Stock First
The Check available stock first feature allows the system to use existing stock before triggering procurement:Enabling the Feature
Enable Check Available Stock First
Under the Stock Request section, check Check available stock first.
How It Works
Advanced Procurement Scenarios
Conditional Route Selection
You can implement logic to select routes dynamically:Multi-Warehouse Procurement
For multi-warehouse setups, configure routes to pull from other warehouses:Dropshipping via Stock Requests
Configure a route that delivers directly to customers:Troubleshooting Procurement Issues
No procurement triggered when confirming request
No procurement triggered when confirming request
Possible Causes:
- Product type is “Service” (only consumable and storable products can be procured)
- No route selected or configured
- Route rules don’t match the destination location
- Verify product type in product form
- Select an appropriate route on the stock request
- Check route rules have destination locations matching the request location hierarchy
Wrong procurement action triggered
Wrong procurement action triggered
Possible Causes:
- Multiple routes apply and wrong one was selected
- Route rules have incorrect action type
- Explicitly select the desired route on the stock request
- Review route rules in Inventory > Configuration > Routes
- Check rule priority and warehouse associations
Stock move created but not linked to request
Stock move created but not linked to request
Possible Causes:
- Stock rule doesn’t include allocation logic
- Procurement values don’t include
stock_request_id
- Verify the Stock Request module properly inherits
stock.rule - Check that
_get_stock_move_valuesincludes allocation creation - Review allocation records in Inventory > Operations > Stock Request Allocations
Route not available in request form
Route not available in request form
Possible Causes:
- Route is not associated with the selected warehouse
- Route rules don’t match the destination location
- Route is product-specific and doesn’t apply
- Check route configuration in Inventory > Configuration > Routes
- Verify warehouse association
- Ensure at least one rule’s destination location matches the request location or its parents
Best Practices
- Configure warehouse-specific routes rather than global routes for better control
- Set realistic delay values on rules to improve expected date calculations
- Use procurement groups to keep related moves together in pickings
- Enable “Check available stock first” for cost savings and faster fulfillment
- Document custom routes and their intended use cases
- Test routes with sample stock requests before deploying to production
- Monitor procurement failures and adjust route configurations accordingly
- Use multi-step routes for quality control and staged operations
- Configure appropriate push rules for automatic replenishment scenarios
- Review route performance periodically and optimize based on actual usage patterns
