stock_request_purchase module bridges stock requests with the purchasing system, allowing users to track and manage purchase orders that are automatically generated from confirmed stock requests.
Overview
Module Name:stock_request_purchaseVersion: 18.0.1.0.0
License: LGPL-3
Dependencies:
stock_request, purchase_stockAuthor: ForgeFlow, OCA
Maintainers: @LoisRForgeFlow, @etobella
Auto Install: Yes (when both dependencies are met)
This module enables visibility into purchase orders created as a consequence of stock requests, providing seamless integration between internal requests and external procurement.
Key Features
Purchase Order Visibility
- View purchase orders generated from stock requests
- Smart button showing PO count on request form
- Direct navigation from request to related POs
- Track PO status from stock request interface
Automatic Integration
- POs created automatically via procurement rules
- Stock request origin tracked on purchase order lines
- Bidirectional reference between requests and POs
- Updates propagate between requests and orders
Order-Level Tracking
- View all POs from stock request orders
- Consolidated purchase order information
- Track multiple requests fulfilled by same PO
Installation
This module installs automatically when both
stock_request and purchase_stock modules are installed.Install Prerequisites
Ensure these modules are installed:
stock_request(Stock Request)purchase_stock(Purchase Stock)
Configuration
Procurement Rule Setup
For stock requests to generate purchase orders, configure procurement rules:Configure Product Routes
Go to Inventory > Products > Products and select a product.In the Inventory tab:
- Check Can be Purchased
- Add Buy route
Set Vendor Information
In the Purchase tab:
- Add at least one vendor
- Set lead time
- Configure minimum order quantity if needed
Warehouse Configuration
Ensure warehouse is configured for purchasing:Usage
Creating Request that Triggers Purchase
Create Stock Request
Go to Stock Requests > Stock Requests and click Create.Fill in:
- Product: Select a purchasable product
- Quantity: Amount needed
- Location: Destination (must trigger buy rule)
- Expected Date: When needed
View Created PO
If procurement triggers a purchase:
- Smart button Purchase Orders appears
- Shows count of related POs
- Click to view purchase order(s)
Viewing Related Purchase Orders
From Stock Request
- Open a stock request
- Click the Purchase Orders smart button (shows count)
- View list of related POs
- Click any PO to see details
From Stock Request Order
- Open a stock request order
- Click Purchase Orders smart button
- See all POs generated from any request in the order
- Access consolidated purchase information
Managing Purchase Order Lifecycle
Draft PO Created
Draft PO Created
When stock request confirmed:
- PO created in draft state
- Contains line(s) for requested product(s)
- Origin references stock request
- Can be edited before confirmation
PO Confirmed
PO Confirmed
Purchase manager confirms PO:
- Order sent to supplier
- Expected receipt date set
- Stock request tracks PO status
Products Received
Products Received
When products arrive:
- Receive products via incoming shipment
- Stock moves complete
- Stock request quantities update
- Request moves to done when fully received
Data Models
Stock Request (Extended)
Adds purchase order relationship:Purchase Order Line (Extended)
Tracks originating stock request:Stock Request Order (Extended)
Adds order-level purchase tracking:Views
Stock Request Form View
Enhanced with:Purchase Order Form View
Enhanced with:- Stock request reference on order lines
- Origin field shows stock request name
- Smart button to view related stock requests
Procurement Flow
Request to Purchase Flow
Technical Flow
Best Practices
Vendor Configuration
Request Planning
Route Configuration
Known Issues
Workaround for Cancellation
When cancelling a request with open PO:Troubleshooting
No PO Created After Confirmation
Problem: Stock request confirmed but no purchase order generated. Solutions:- Verify product has Can be Purchased checked
- Ensure Buy route is active on product
- Check vendor is configured with price
- Verify procurement rules exist for destination location
- Review product routes apply to requested location
Wrong Vendor Selected
Problem: PO created with unintended vendor. Solutions:- Check vendor priority/sequence in product suppliers
- Review vendor lead times (system picks best option)
- Ensure correct vendor marked as default
PO Quantity Incorrect
Problem: Purchase order quantity doesn’t match request. Solutions:- Check minimum order quantity on vendor product
- Review product packaging configuration
- Verify UoM conversions between request and purchase
- Check if multiple requests consolidated into one PO
Integration Examples
Programmatic PO Access
Finding Requests from PO
Related Modules
Stock Request Core
Base functionality for stock requests
Stock Request MRP
Similar integration for manufacturing orders
Stock Request Submit
Add approval before PO creation
Purchase Module
Odoo standard purchasing documentation
Advanced Configuration
Multiple Warehouses
When working with multiple warehouses:- Configure warehouse-specific procurement rules
- Set preferred vendors per warehouse if needed
- Use stock request orders to group by warehouse
- Review inter-warehouse transfers vs. direct purchase
Dropshipping
For dropship scenarios:- Configure dropship route on products
- Stock requests can trigger dropship POs
- Products ship directly to request location
- No incoming shipment to main warehouse
Dropshipping requires the
stock_dropshipping module to be installed.