IDB BOM ModuleIDB BOM 模块
Odoo 19 — Bill of Materials for Bag ManufacturingOdoo 19 — 箱包制造物料清单
Transform CAD exports into structured Odoo BOMs. From Excel import to color variant generation, product matching, and cost simulation.将CAD导出转化为结构化的Odoo BOM。从Excel导入到颜色变体生成、产品匹配和成本模拟。
Current State vs Future State现状对比未来方案
IDB currently uses a kit-based BOM structure in Odoo, creating one sub-assembly product per pattern piece per SKU. The proposed mjb_idb_bom module replaces this with a flat BOM where pattern pieces are labels, not products.
IDB目前在Odoo中使用基于套件的BOM结构,为每个SKU的每个裁片创建一个子组件产品。提议的 mjb_idb_bom 模块将其替换为扁平BOM,裁片仅为标签而非产品。
Current Odoo BOM (Kit-Based)当前Odoo BOM(套件式)
One sub-assembly product per pattern piece, each with its own kit BOM 每个裁片一个子组件产品,每个都有自己的套件BOM
Problems with This Approach此方法的问题
Proposed — mjb_idb_bom (Flat BOM)提议方案 — mjb_idb_bom(扁平BOM)
Single BOM per finished product, pattern pieces as labels on lines, max 2 levels 每个成品一个BOM,裁片作为行上的标签,最多2层
Benefits of This Approach此方法的优势
CAD Excel Export FormatCAD Excel导出格式
The source data from ET-BAG CAD software that the import wizard parses 导入向导解析的邦臣ET-BAG CAD软件源数据
| Level层级 | Parent Product父级产品 | Component / Sub-Assembly组件 / 子组件 | Quantity数量 | Unit单位 | Type类型 |
|---|---|---|---|---|---|
| 0 | — | G2550 | 1 | pc | Finished Product成品 |
| 1 | G2550 | G2550-前幅 | 1 | pc | Pattern Piece裁片 |
| 2 | G2550-前幅 | 主料贴加密1.0mm特软高弹力纯胶消光54 | 0.14 | m | Raw Material原材料 |
| 2 | G2550-前幅 | 1.0mm中性磅布54 | 0.12 | m | Non-woven无纺布 |
| 1 | G2550 | G2550-磁钮位托 | 1 | pc | Pattern Piece裁片 |
| 2 | G2550-磁钮位托 | 1.0mm中性磅布54 | 0.01 | yd | Non-woven无纺布 |
BOM StructureBOM 结构
CAD software exports material data per pattern piece into Excel. Manual re-entry into ERP is slow and error-prone.CAD软件按裁片将材料数据导出到Excel。手动重新录入ERP既缓慢又容易出错。
2-level BOM: finished product at top, composites + raw materials one level down. Composites have sub-BOMs for their ingredients. Process tags on composite lines drive external processing.两层BOM:成品在顶层,复合材料+原材料在下一层。复合材料有子BOM记录其成分。复合材料行上的工序标签驱动外部加工。
2-Level Maximum最多两层结构
Finished product → direct raw materials + composites. Composites have their own sub-BOMs (one level down). Never deeper than 2 levels.成品 → 直接原材料 + 复合材料。复合材料有自己的子BOM(下一层)。不会超过两层。
Process Tags on Composites复合材料工序标签
Process tags (e.g. "Printed", "Laminated") sit on composite BOM lines (L1), not on raw material lines inside the composite's sub-BOM.工序标签(如"印花"、"覆膜")放在复合材料BOM行(L1)上,而不是复合材料子BOM内的原材料行上。
Placeholder Products占位产品
On import, each material type gets a placeholder product. Real products are assigned via the matching workflow.导入时,每种材料类型都会获得一个占位产品。通过匹配工作流分配实际产品。
BOM Tree Structure (2-Level Max)BOM树形结构(最多两层)
Finished product at L0, composites and raw materials at L1, composite sub-components at L2成品在L0,复合材料和原材料在L1,复合材料子组件在L2
G2550 BOM LinesG2550 BOM行
Real data from the reference bag model来自参考箱包型号的真实数据
| Part部位 | Material材料 | L(cm)长(cm) | W(cm)宽(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.客户从CAD导出手动重新录入BOM数据——繁琐、缓慢且容易出现转录错误。
Odoo-native wizard: upload .xls → detect SKU → preview parsed lines → one-click import.Odoo原生向导:上传 .xls → 检测SKU → 预览解析行 → 一键导入。
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.BOM映射器(外部应用) — 独立的Web应用映射CAD导出。已拒绝,因为需要维护单独的系统、独立的认证和同步逻辑。Odoo向导方式将一切保持在一个地方。
Hybrid Approach — External parser + Odoo API import. Rejected because it adds deployment complexity and a potential point of failure outside Odoo.混合方式 — 外部解析器 + Odoo API导入。已拒绝,因为增加了部署复杂性和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.导入后,每个BOM行都有一个占位产品。用户需要将每种材料链接到真实的Odoo产品。
Smart button on BOM form → filtered list of unmatched lines → mass-edit product_id. Count decreases in real time.BOM表单上的智能按钮 → 未匹配行的过滤列表 → 批量编辑 product_id。计数实时减少。
Smart button on BOM form header — count updates as products are assignedBOM表单头部的智能按钮——产品分配后计数自动更新
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.产品选择器使用Odoo标准的Many2one搜索,附加材料类型和中文名称匹配过滤。
Progressive Matching渐进匹配
Each assignment immediately decreases the unmatched count. Once the count reaches zero, the smart button turns green.每次分配都会立即减少未匹配计数。计数为零时智能按钮变绿。
Flattened View扁平视图
Unmatched lines are shown in a flattened list that expands composite sub-BOMs inline, so the user sees every raw material regardless of BOM depth.未匹配行显示在扁平列表中,复合材料子BOM内联展开,用户可以看到每种原材料,无论BOM深度如何。
Color Mapping颜色映射
Same bag SKU is produced in multiple colorways — manual BOM duplication is error-prone and hard to maintain.同一箱包SKU需要多种配色生产——手动复制BOM容易出错且难以维护。
Matrix wizard: select color variants → check override per line per color → auto-generate variant BOMs with correct products.矩阵向导:选择颜色变体 → 按行按颜色勾选覆盖 → 自动生成正确产品的变体BOM。
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爪钉 |
Flattened Color Matrix扁平颜色矩阵
The color mapping matrix shows flattened materials — composite sub-BOM components are expanded inline so each raw material can be independently assigned a color variant.颜色映射矩阵显示扁平化材料——复合材料子BOM组件内联展开,使每种原材料都可以独立分配颜色变体。
Change Management (ECO)变更管理 (ECO)
BOM edits go live immediately with no traceability. No history of what changed, when, or why.BOM编辑立即生效,无可追溯性。没有变更内容、时间或原因的记录。
Standard Odoo PLM — ECO workflow: Draft → Review → Approved → Version archived. All changes tracked.标准Odoo PLM — ECO工作流:草稿 → 审核 → 批准 → 版本归档。所有变更均被追踪。
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.自定义版本控制系统 — 从头构建自己的变更追踪。已拒绝,因为Odoo PLM已经提供了现成的ECO、审批工作流和版本历史。没有理由重新发明轮子。
Operations & Routing工序与工路
Multi-level BOMs create nested Manufacturing Orders with heavyweight overhead — not suited for bag assembly workflows.多层BOM创建嵌套的生产单,带来沉重的管理负担——不适合箱包组装工作流程。
Single flat BOM, single MO, multiple Work Orders. Materials consumed at the right operation via bom_line_id.operation_id.单一扁平BOM,单一生产单,多个工单。通过 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.Odoo默认BOM视图是层级式且技术化的——工厂人员难以阅读和核实材料。
Custom flat list view tab on the BOM form + printable QWeb PDF report. Shows all BOM lines grouped by type with totals.BOM表单上的自定义扁平列表视图标签页 + 可打印的QWeb PDF报表。按类型分组显示所有BOM行及合计。
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.作为新标签页添加到BOM表单视图,紧邻现有的"组件"和"工序"标签页。按材料类型分组。
QWeb PDF ReportQWeb PDF报表
Printable report with company header, BOM summary, material totals per type, and cost estimates. Suitable for factory floor use.可打印报表,包含公司抬头、BOM摘要、按类型的材料合计和成本估算。适合车间使用。
Costing成本核算
Overhead, freight, and duties must not be BOM lines — they would generate MRP demand and create phantom purchase orders.间接费用、运费和关税不能作为BOM行——它们会产生MRP需求并创建虚假采购订单。
Separate cost simulation table: name, amount, currency, notes. Simulated total = BOM material cost + cost lines. No MRP impact.独立的成本模拟表:名称、金额、币种、备注。模拟总计 = BOM材料成本 + 成本行。不影响MRP。
Cost Simulation Table成本模拟表
| Item项目 | Amount金额 | Currency币种 | Notes备注 |
|---|---|---|---|
| Factory overhead工厂间接费用 | ¥45.00 | CNY | Per unit estimate单件预估 |
| Estimated freight预估运费 | ¥12.50 | CNY | FOB ShenzhenFOB 深圳 |
| Import duties进口关税 | €3.20 | EUR | EU tariff 4202欧盟关税 4202 |
| QC inspection质检费用 | ¥8.00 | CNY | AQL 2.5 |
| Simulated Total模拟总计 | ¥185.70 | Material ¥117.00 + Overhead ¥68.70材料 ¥117.00 + 间接费用 ¥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临时向导 — Excel上传、解析、预览
mjb.idb.bom.cost.line
Cost simulation lines — overhead, freight, duties成本模拟行 — 间接费用、运费、关税
mjb.idb.color.mapping
Transient wizard — color variant matrix & BOM generation临时向导 — 颜色变体矩阵与BOM生成
mrp.bom.line
Extended — process_tag_ids ordered list of process tags on composite lines扩展 — 复合材料行上的 process_tag_ids 有序工序标签列表
mjb.process.tag
Process tag definitions — name, sequence, linked service product工序标签定义 — 名称、顺序、关联服务产品
Dependencies依赖模块
Out of Scope不在范围内
- DXF import from CAD files (Phase 2)从CAD文件导入DXF(第二阶段)
- Material mapping memory / learning (Phase 3)材料映射记忆/学习(第三阶段)
- Multi-SKU per file import每个文件导入多个SKU