IDB BOM Module
Odoo 19 — Bill of Materials for Bag Manufacturing
Transform CAD exports into structured Odoo BOMs. From Excel import to color variant generation, product matching, and cost simulation.
BOM Structure
CAD software exports material data per pattern piece into Excel. Manual re-entry into ERP is slow and error-prone.
Flat BOM model — one line per (material × part). Same material on multiple pieces = multiple lines. Odoo sums automatically for MRP/purchasing.
Pattern Pieces as Labels
Stored as Char field, not products. Pieces identify where material is used but are not inventory items.
Flat Composite Materials
Composite materials (e.g. leather + foam) kept flat by default. No sub-BOMs unless explicitly configured.
Placeholder Products
On import, each material type gets a placeholder product. Real products are assigned via the matching workflow.
G2550 BOM Lines
Real data from the reference bag model
| Part | Material | L(cm) | W(cm) | PCS | Width | Usage | Type |
|---|---|---|---|---|---|---|---|
| 前幅 | 16.91 | 15.41 | 1 | 52" | 0.14 m² | fabric | |
| 后幅 | 16.91 | 15.41 | 1 | 52" | 0.14 m² | fabric | |
| 内前幅 | 13.89 | 15.41 | 1 | 52" | 0.12 m² | lining | |
| 内后幅 | 13.89 | 15.41 | 1 | 52" | 0.12 m² | lining | |
| 前内插袋 | 8.26 | 11.28 | 1 | 52" | 0.05 m² | fabric | |
| 后内吊袋 | 里布 | 11.44 | 8.25 | 1 | 52" | 0.05 m² | lining |
| 前右长肩带 | 34.54 | 0.82 | 1 | 52" | 0.02 m² | fabric | |
| 手挚 | 13.62 | 1.66 | 1 | 52" | 0.02 m² | fabric | |
| 前幅 | 22#鸡眼合金A | — | — | 3 | — | 3 pcs | hardware |
| 前幅 | 3mm爪钉 | — | — | 17 | — | 17 pcs | hardware |
| 前幅 | 6mm×5mm单面蘑菇钉A | — | — | 9 | — | 9 pcs | hardware |
| 侧围耳仔 | 5分×4分圆线D扣铁A | — | — | 2 | — | 2 pcs | hardware |
| 后内窗 | 乌石5#尼龙拉链 | 8.0 | — | 1 | — | 8 cm | hardware |
Import Wizard
Client re-enters BOM data manually from CAD exports — tedious, slow, and prone to transcription errors.
Odoo-native wizard: upload .xls → detect SKU → preview parsed lines → one-click import.
BOM Mapper (External App) — Separate web app that maps CAD exports. Rejected because it requires maintaining a separate system, separate auth, and synchronization logic. The wizard-in-Odoo approach keeps everything in one place.
Hybrid Approach — External parser + Odoo API import. Rejected because it adds deployment complexity and a potential point of failure outside Odoo.
Wizard Preview Mockup
| Part | Material (ZH) | Type | Usage | Status | |
|---|---|---|---|---|---|
| 前幅 | fabric | 0.14 m² | parsed | ||
| 后幅 | fabric | 0.14 m² | parsed | ||
| 内前幅 | lining | 0.12 m² | parsed | ||
| 前幅 | 22#鸡眼合金A | hardware | 3 pcs | parsed | |
| 前幅 | 3mm爪钉 | hardware | 17 pcs | parsed |
Product Matching
After import, every BOM line has a placeholder product. The user needs to link each material to a real Odoo product.
Smart button on BOM form → filtered list of unmatched lines → mass-edit product_id. Count decreases in real time.
Smart button on BOM form header — count updates as products are assigned
Material Type Grouping
Unmatched lines are grouped by material type (fabric, lining, hardware, etc.) so the user can bulk-assign similar materials efficiently.
Fuzzy Search
Product selector uses Odoo's standard Many2one search with additional filters on material type and Chinese name matching.
Progressive Matching
Each assignment immediately decreases the unmatched count. Once the count reaches zero, the smart button turns green.
Color Mapping
Same bag SKU is produced in multiple colorways — manual BOM duplication is error-prone and hard to maintain.
Matrix wizard: select color variants → check override per line per color → auto-generate variant BOMs with correct products.
Interactive Color Mapping Matrix
Toggle checkboxes to assign color-specific products to each material line
| Material (ZH) | Master Product | Red | Blue | Black |
|---|---|---|---|---|
| Outer Leather | ||||
| Lining Fabric | ||||
| Accent Fabric | ||||
| 22#鸡眼合金 | Eyelet Alloy | |||
| 3mm爪钉 | Claw Rivets |
Change Management (ECO)
BOM edits go live immediately with no traceability. No history of what changed, when, or why.
Standard Odoo PLM — ECO workflow: Draft → Review → Approved → Version archived. All changes tracked.
Re-Import Diff Preview
| Change | Description | Old Value | New Value |
|---|---|---|---|
| ➕ Added | 新增补强 前幅底部 | — | qty = 0.03 m² |
| ✎ Modified | 前幅 主料 usage | 0.14 m² | 0.16 m² |
| ✎ Modified | 后幅 defect rate | 0% | 3% |
| ➖ Removed | 插锁吊绳 主料双层夹贴 | qty = 0.01 | — |
Custom Versioning System — Building our own change tracking from scratch. Rejected because Odoo PLM already provides this out of the box with ECOs, approval workflows, and version history. No reason to reinvent.
Operations & Routing
Multi-level BOMs create nested Manufacturing Orders with heavyweight overhead — not suited for bag assembly workflows.
Single flat BOM, single MO, multiple Work Orders. Materials consumed at the right operation via bom_line_id.operation_id.
Manufacturing Operations Sequence
Views & Reports
Odoo's default BOM view is hierarchical and technical — difficult for factory staff to read and verify materials.
Custom flat list view tab on the BOM form + printable QWeb PDF report. Shows all BOM lines grouped by type with totals.
Flat View Mockup
| # | Part | Material | Product | Type | Usage | UoM | Operation | Matched |
|---|---|---|---|---|---|---|---|---|
| 1 | 前幅 | Outer Leather Red | fabric | 0.14 | m² | Cutting | ✓ | |
| 2 | 后幅 | Outer Leather Red | fabric | 0.14 | m² | Cutting | ✓ | |
| 3 | 内前幅 | Red Lining | lining | 0.12 | m² | Cutting | ✓ | |
| 4 | 前幅 | 22#鸡眼合金A | Placeholder | hardware | 3 | pcs | Hardware | ● |
| 5 | 前幅 | 3mm爪钉 | Placeholder | hardware | 17 | pcs | Hardware | ● |
Flat List Tab
Added as a new tab on the BOM form view, next to the existing "Components" and "Operations" tabs. Grouped by material type.
QWeb PDF Report
Printable report with company header, BOM summary, material totals per type, and cost estimates. Suitable for factory floor use.
Costing
Overhead, freight, and duties must not be BOM lines — they would generate MRP demand and create phantom purchase orders.
Separate cost simulation table: name, amount, currency, notes. Simulated total = BOM material cost + cost lines. No MRP impact.
Cost Simulation Table
| Item | Amount | Currency | Notes |
|---|---|---|---|
| Factory overhead | ¥45.00 | CNY | Per unit estimate |
| Estimated freight | ¥12.50 | CNY | FOB Shenzhen |
| Import duties | €3.20 | EUR | EU tariff 4202 |
| QC inspection | ¥8.00 | CNY | AQL 2.5 |
| Simulated Total | ¥185.70 | Material ¥117.00 + Overhead ¥68.70 |
Technical Scope
Module Name
mjb_idb_bom
Target Platform
Odoo 19
Models
mrp.bom.line
Extended — pattern piece, material type, Chinese name fields
mjb.idb.bom.import
Transient wizard — Excel upload, parsing, preview
mjb.idb.bom.cost.line
Cost simulation lines — overhead, freight, duties
mjb.idb.color.mapping
Transient wizard — color variant matrix & BOM generation
Dependencies
Out of Scope
- DXF import from CAD files (Phase 2)
- Material mapping memory / learning (Phase 3)
- Multi-SKU per file import