stock_request_bom module enhances stock request orders by enabling automatic population of request lines based on a Bill of Materials (BoM), streamlining the process of requesting all components for a manufactured product.
Overview
Module Name:stock_request_bomVersion: 18.0.1.0.1
License: LGPL-3
Dependencies:
stock_request, mrpAuthor: ForgeFlow, OCA
Category: Warehouse Management
Auto Install: Yes (when both dependencies are met)
This module allows you to select a product’s Bill of Materials and automatically create stock request lines for all components, simplifying the process of requesting materials for production.
Key Features
BoM-Based Line Generation
- Select a product BoM in stock request order
- Specify quantity multiplier
- Automatically generate request lines for all BoM components
- Quantities calculated based on BoM and multiplier
Dynamic Updates
- Change quantity BoM to recalculate component quantities
- Update BoM selection to load different components
- Clear BoM selection to remove auto-generated lines
- Manual adjustments to generated lines supported
Flexible Workflow
- Mix BoM-generated and manually-added request lines
- Multiple BoMs can be used in same order
- Update BoM without losing manual entries
- Supports multi-level BoMs with subassemblies
Installation
This module installs automatically when both
stock_request and mrp modules are installed.Install Prerequisites
Ensure these modules are installed:
stock_request(Stock Request)mrp(Manufacturing)
Configuration
Bill of Materials Setup
Ensure products have properly configured BoMs:Create or Edit BoM
For each finished product:
- Set Product (finished product)
- Add Components with quantities
- Specify BoM Type: Manufacture this product
- Save the BoM
Product Configuration
Products used in BoM-based requests should:- Have Can be Manufactured enabled
- Have at least one active BoM
- Have components properly configured
Usage
Auto-Filling from BoM
Select Product BoM
In the order form:
- Product BoM: Select the finished product whose components you need
- The system loads the BoM for that product
Enter Quantity BoM
- Quantity BoM: Enter how many units of the finished product you’re planning to make
- Example: If BoM is for 1 unit and you enter 10, components will be calculated for 10 units
Auto-Generate Lines
Click outside the field or press Tab:
- Request lines automatically created for each BoM component
- Quantities calculated: Component Qty × Quantity BoM
- UoM matched to component product UoM
Review and Adjust
- Review generated request lines
- Make manual adjustments if needed
- Add additional lines not in BoM
Updating Quantity
To change the quantity multiplier:Changing BoM Selection
To load a different BoM:Clearing BoM Selection
To remove BoM-generated lines:Data Models
Stock Request Order (Extended)
Adds BoM-related fields:Onchange Methods
Views
Stock Request Order Form
Enhanced with BoM fields:Calculation Logic
Component Quantity Calculation
For each component in the BoM:- BoM component: 5 units
- Quantity BoM: 3
- Request line quantity: 5 × 3 = 15 units
UoM Handling
Use Cases
Production Material Request
Scenario: Production manager needs all materials for a production run.Kitting Operations
Scenario: Assemble kits for customer orders. Setup:- Create BoM for kit with all components
- Use BoM module to request kit components
Project Material Planning
Scenario: Request materials for multiple units in a project. Workflow:- Select product BoM for project deliverable
- Set quantity to project requirement
- System calculates total material needs
- Confirm to request all materials
Best Practices
BoM Maintenance
Request Planning
Mixed Requests
Integration with Other Modules
Stock Request MRP
When used withstock_request_mrp:
BoM-generated component requests can trigger procurement, while the finished product itself can be manufactured via a separate stock request.
- Create order for finished product components (using BoM module)
- Confirm to procure/transfer components
- Create separate request for finished product
- Confirm to trigger manufacturing order
- Components already available from first request
Stock Request Purchase
Components in BoM-generated requests can trigger purchase orders:- Select product BoM
- Set quantity BoM
- Confirm request order
- Purchasable components trigger POs
- Track all POs from request order
Advanced Features
Multi-Level BoMs
For nested BoMs (BoM with subassemblies):The module uses the primary BoM level only. For subassemblies, you may need to:
- Request finished product (triggers MO which handles subassemblies)
- Or manually create separate requests for subassemblies
BoM Variants
When product has variants:- Select specific variant in Product BoM field
- System loads variant-specific BoM
- Component quantities based on variant BoM
Phantom BoMs
For phantom/kit BoMs:- Module treats same as regular BoMs
- All components listed in request lines
- Phantom nature handled during procurement
Troubleshooting
No Lines Generated
Problem: Selecting Product BoM doesn’t create request lines. Solutions:- Verify product has an active BoM
- Check BoM is not archived
- Ensure BoM has components defined
- Verify Quantity BoM is greater than zero
- Check BoM company matches request order company
Incorrect Quantities
Problem: Component quantities don’t match expectation. Solutions:- Review BoM component quantities
- Check Quantity BoM value
- Verify UoM conversions
- Ensure BoM quantities are per unit of finished product
Lines Overwritten
Problem: Manual changes lost when updating Quantity BoM. Solutions:- Make manual adjustments after setting final Quantity BoM
- Mark BoM-generated lines distinctly (e.g., in notes)
- Use separate request orders for BoM and manual requests
Wrong BoM Loaded
Problem: System loads unexpected BoM. Solutions:- Check if multiple BoMs exist for product
- Verify BoM is marked as primary/default
- Review BoM applicability rules
- Check BoM dates and validity
API Examples
Programmatic BoM Line Generation
Reading BoM Data
Related Modules
Stock Request Core
Base stock request functionality
Stock Request MRP
Manufacturing order integration
Stock Request Purchase
Purchase order generation for components
MRP Module
Odoo manufacturing and BoM documentation
Calculation Examples
Example 1: Simple BoM
BoM for Product “Chair”:- 4 × Leg
- 1 × Seat
- 4 × Screw
- Product BoM: Chair
- Quantity BoM: 5
- Leg: 4 × 5 = 20 units
- Seat: 1 × 5 = 5 units
- Screw: 4 × 5 = 20 units
Example 2: Fractional Quantities
BoM for Product “Solution”:- 0.5 L × Chemical A
- 0.3 L × Chemical B
- 2.5 L × Water
- Product BoM: Solution
- Quantity BoM: 10 L
- Chemical A: 0.5 × 10 = 5.0 L
- Chemical B: 0.3 × 10 = 3.0 L
- Water: 2.5 × 10 = 25.0 L
