🔒

IDB BOM Module

This specification is confidential. Enter the access code to continue.本规格说明为机密文件。请输入访问密码以继续。

Incorrect access code. Please try again.访问密码错误。请重试。
Product Specification产品规格说明

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导入到颜色变体生成、产品匹配和成本模拟。

10
Spec Areas规格领域
19
Odoo VersionOdoo 版本
1+2
Phases阶段
01 — OVERVIEW

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,裁片仅为标签而非产品。

Before: Kit-Based BOM现状:套件式BOM
After: Flat BOM (mjb_idb_bom)未来:扁平BOM (mjb_idb_bom)

Current Odoo BOM (Kit-Based)当前Odoo BOM(套件式)

One sub-assembly product per pattern piece, each with its own kit BOM 每个裁片一个子组件产品,每个都有自己的套件BOM

G2550 Finished Product成品
├─ G2550-鸡眼位内垫 Kit BOM
│   └─ Materials...材料...
├─ G2550-后内吊袋 Kit BOM
│   └─ Materials...材料...
├─ G2550-前内插袋位补强 Kit BOM
│   └─ Materials...材料...
├─ G2550-后内插袋底补强 Kit BOM
│   └─ Materials...材料...
├─ G2550-磁钮位生托 Kit BOM
│   └─ Materials...材料...
├─ G2550-前幅锁底加托 Kit BOM
│   └─ Materials...材料...
├─ G2550-磁钮位托 Kit BOM
│   ├─ 1.0mm中性磅布54 (0.01 yd)
│   └─ ...
├─ G2550-前左短肩带介指 Kit BOM
│   └─ Materials...材料...
├─ G2550-前幅 Kit BOM
│   └─ 主料贴加密1.0mm特软高弹力纯胶消光54 (0.14m)
├─ G2550-后幅 Kit BOM
│   └─ Materials...材料...
├─ G2550-盖面贴 Kit BOM
│   └─ Materials...材料...
└─ G2550-前右长肩带 Kit BOM
    └─ Materials...材料...

Problems with This Approach此方法的问题

Master data explosion: one product record per pattern piece per SKU主数据爆炸:每个SKU的每个裁片都需要一条产品记录
Pattern pieces are NOT real inventory items — they don't exist in the warehouse裁片不是真正的库存物品——它们不存在于仓库中
12+ sub-assembly products per SKU x hundreds of SKUs = thousands of phantom products每个SKU 12+ 子组件产品 x 数百个SKU = 数千个虚拟产品
Complex multi-level BOM structure to maintain — each piece is a separate BOM复杂的多层BOM结构需要维护——每个裁片都是独立的BOM
No aggregated material view for purchasing — materials scattered across kit BOMs采购无法看到汇总材料视图——材料分散在各个套件BOM中

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层

G2550 Single BOM — mrp.bom单一BOM — mrp.bom
├─ 主料贴加密1.0mm特软高弹力纯胶消光54 [part: 前幅] COMPOSITE
├─ 1.0mm中性磅布54 [part: 磁钮位托] non-woven
├─ 22#鸡眼合金 [part: 鸡眼位] HARDWARE
├─ Composite X (sub-BOM if subcontracted)(外协时有子BOM)
│   ├─ Raw material C原材料 C
│   └─ Raw material D原材料 D
└─ ... (all materials flat, one BOM)(所有材料扁平化,一个BOM)

Benefits of This Approach此方法的优势

Zero master data explosion — pattern pieces are just labels (char field), not products零主数据爆炸——裁片只是标签(字符字段),不是产品
Single BOM per finished product to manage — dramatically simpler每个成品一个BOM即可管理——极大简化
Max 2 levels — flat raw materials + optional composite sub-BOMs only最多2层——扁平原材料 + 仅需可选的复合材料子BOM
Aggregated material view for purchasing built-in via group-by on BOM lines内置采购汇总材料视图——通过BOM行分组即可实现
Imports directly from CAD Excel export — no manual re-entry直接从CAD Excel导出文件导入——无需手动重新录入

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无纺布
02 — CORE

BOM StructureBOM 结构

Problem问题

CAD software exports material data per pattern piece into Excel. Manual re-entry into ERP is slow and error-prone.CAD软件按裁片将材料数据导出到Excel。手动重新录入ERP既缓慢又容易出错。

Solution解决方案

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 手提包 L0 Finished ProductL0 成品
├─ 主料贴加密1.0mm纯胶消光54 COMPOSITE ← process_tag_ids: ["Printed"]
│   ├─ PU 面料 0.8mm (raw)
│   └─ 加密布 1.0mm (raw)
├─ 里布贴进口30g无纺布62 COMPOSITE
│   ├─ 里布 (raw)
│   └─ 30g无纺布 (raw)
├─ 22#鸡眼合金A HARDWARE (raw, no sub-BOM)五金件(原材料,无子BOM)
├─ 3mm爪钉 HARDWARE (raw, no sub-BOM)五金件(原材料,无子BOM)
└─ 乌石5#尼龙拉链 HARDWARE (raw, no sub-BOM)五金件(原材料,无子BOM)

G2550 BOM LinesG2550 BOM行

Real data from the reference bag model来自参考箱包型号的真实数据

Part部位 Material材料 L(cm)长(cm) W(cm)宽(cm) PCS件数 Width幅宽 Usage用量 Type类型
前幅 主料贴加密1.0mm特软高弹力纯胶消光54 16.9115.41152" 0.14 m² fabric
后幅 主料贴加密1.0mm特软高弹力纯胶消光54 16.9115.41152" 0.14 m² fabric
内前幅 里布贴进口30g无纺布62 13.8915.41152" 0.12 m² lining
内后幅 里布贴进口30g无纺布62 13.8915.41152" 0.12 m² lining
前内插袋 配料贴TC棉56西园纺织 8.2611.28152" 0.05 m² fabric
后内吊袋 里布 11.448.25152" 0.05 m² lining
前右长肩带 主料双层夹贴1.2mm中性磅布54 34.540.82152" 0.02 m² fabric
手挚 主料双层夹贴1.2mm中性磅布54 13.621.66152" 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.01 8 cm hardware
03 — WORKFLOW

Import Wizard导入向导

Problem问题

Client re-enters BOM data manually from CAD exports — tedious, slow, and prone to transcription errors.客户从CAD导出手动重新录入BOM数据——繁琐、缓慢且容易出现转录错误。

Solution解决方案

Odoo-native wizard: upload .xls → detect SKU → preview parsed lines → one-click import.Odoo原生向导:上传 .xls → 检测SKU → 预览解析行 → 一键导入。

1
Upload上传
Select .xls file from CAD export选择CAD导出的.xls文件
2
SKU ResolutionSKU识别
Auto-detect or manually enter product SKU自动检测或手动输入产品SKU
3
Preview & Confirm预览并确认
Review parsed lines, edit, then 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.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状态
前幅 主料贴加密1.0mm特软高弹力纯胶消光54 fabric 0.14 m² parsed已解析
后幅 主料贴加密1.0mm特软高弹力纯胶消光54 fabric 0.14 m² parsed已解析
内前幅 里布贴进口30g无纺布62 lining 0.12 m² parsed已解析
前幅 22#鸡眼合金A hardware 3 pcs parsed已解析
前幅 3mm爪钉 hardware 17 pcs parsed已解析
04 — WORKFLOW

Product Matching产品匹配

Problem问题

After import, every BOM line has a placeholder product. The user needs to link each material to a real Odoo product.导入后,每个BOM行都有一个占位产品。用户需要将每种材料链接到真实的Odoo产品。

Solution解决方案

Smart button on BOM form → filtered list of unmatched lines → mass-edit product_id. Count decreases in real time.BOM表单上的智能按钮 → 未匹配行的过滤列表 → 批量编辑 product_id。计数实时减少。

🔗  Lines to Match待匹配行 23

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深度如何。

05 — VARIANTS

Color Mapping颜色映射

Problem问题

Same bag SKU is produced in multiple colorways — manual BOM duplication is error-prone and hard to maintain.同一箱包SKU需要多种配色生产——手动复制BOM容易出错且难以维护。

Solution解决方案

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黑色
主料贴加密1.0mm... Outer Leather外部皮革
里布贴进口30g... Lining Fabric里布
配料贴TC棉56... Accent Fabric辅料面料
22#鸡眼合金 Eyelet Alloy鸡眼合金
3mm爪钉 Claw Rivets爪钉
3 variant BOMs will be generated个变体BOM将被生成

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组件内联展开,使每种原材料都可以独立分配颜色变体。

06 — PLM

Change Management (ECO)变更管理 (ECO)

Problem问题

BOM edits go live immediately with no traceability. No history of what changed, when, or why.BOM编辑立即生效,无可追溯性。没有变更内容、时间或原因的记录。

Solution解决方案

Standard Odoo PLM — ECO workflow: Draft → Review → Approved → Version archived. All changes tracked.标准Odoo PLM — ECO工作流:草稿 → 审核 → 批准 → 版本归档。所有变更均被追踪。

D
Draft草稿
R
Review审核
A
Approved批准
V
Archived归档

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、审批工作流和版本历史。没有理由重新发明轮子。

07 — PHASE 2

Process Tags & Lot Constraints工序标签与批次约束

Problem问题

Some raw materials need external processing (printing, lamination) before use. Traditional approach creates extra BOM levels, extra products, extra MOs — master data explosion.部分原材料需要外部加工(印花、覆膜)才能使用。传统方法会创建额外的BOM层级、额外产品、额外生产单——主数据爆炸。

Solution解决方案

Keep BOM flat (2 levels max). Express process requirements as ordered tags on composite BOM lines. Enforce via lot-level constraints on stock moves.保持BOM扁平(最多2层)。将工序要求以复合材料BOM行上的有序标签表达。通过库存移动上的批次级约束执行。

Core Concepts核心概念

Process Tags on BOM LinesBOM行工序标签

Ordered list of tags on mrp.bom.line (field: process_tag_ids). Each tag = one external process step. Tags sit on composite lines only (L1).mrp.bom.line上的有序标签列表(字段:process_tag_ids)。每个标签=一个外部工序步骤。标签仅放在复合材料行(L1)上。

Lot Tags批次标签

Lots carry tags recording what has been done: RAW (fresh from supplier), Printed (after printing), Laminated (after lamination).批次携带标签记录已完成的工序:RAW(供应商收货)、Printed(印花后)、Laminated(覆膜后)。

Lot Constraints批次约束

Constraint field on BOM lines specifying which lot tag is required to consume that material. Enforced at stock move validation — move cannot confirm if lot tags don't match.BOM行上的约束字段指定消耗该材料所需的批次标签。在库存移动验证时执行——批次标签不匹配时无法确认。

Lot Lifecycle批次生命周期

Example: 主料贴 with process tag "Printed"示例:主料贴带工序标签"Printed"

RAW
RAW-SO-00001
From supplier供应商收货
🏭
Printing印花
Process PO加工采购单
Printed
Printed-SO-00001
Ready for MO可用于生产

MRP Flow with Process Tags带工序标签的MRP流程

1
Raw PO原材料采购
PO from supplier
Lot: RAW-SO-00001
供应商采购单
批次: RAW-SO-00001
2
Process PO加工PO
Service PO for printing
Send raw → receive processed
印花服务采购单
发出原料 → 接收加工品
3
Consume on MO生产消耗
Lot constraint enforced
Only Printed lot accepted
执行批次约束
仅接受Printed批次

Process PO — Stock Moves加工采购单 — 库存移动

Two linked moves on the service PO: send raw material out, receive processed material back服务采购单上的两个关联移动:发出原材料,接收加工品

Move移动 Direction方向 Product产品 Lot批次 Location位置
Send components发出组件 Outgoing出库 主料贴 RAW-SO-00001 Stock → Vendor库存 → 供应商
Receive processed接收加工品 Incoming入库 主料贴 Printed-SO-00001 Vendor → Stock供应商 → 库存

Same product in and out — different lot, different tag. The PO is for the processing service (fee paid to vendor). Lot constraint on the incoming move ensures the lot has the correct tag before receipt can be validated. 进出同一产品——不同批次,不同标签。采购单是为了加工服务(支付给供应商的费用)。入库移动上的批次约束确保批次在验收前具有正确的标签。

Sub-BOM for processed material (extra product) — Creates "主料贴 Printed" as a separate product with its own BOM. Master data explosion — same logic applies to every process variant. Rejected.加工材料子BOM(额外产品) — 将"主料贴 Printed"创建为单独产品及其BOM。主数据爆炸——每个工序变体都需要同样操作。已拒绝。


Internal MO for processing — Cleaner Odoo model but adds a full MO per process step. Overkill for a simple print/emboss operation.内部生产单加工 — 更干净的Odoo模型,但每个工序步骤都需要一个完整的生产单。对于简单的印花/压花操作来说过于复杂。

Lot Naming Convention批次命名规则

Lot Name批次名称 State状态 Description说明
RAW-SO-00001 RAW Fresh material from supplier, linked to SO-00001供应商新材料,关联SO-00001
Printed-SO-00001 Printed Same material after printing process, same SO印花后的同一材料,同一SO
Laminated-SO-00001 Laminated After lamination step, same SO覆膜后,同一SO
08 — PHASE 2

Operations & Routing工序与工路

Problem问题

Multi-level BOMs create nested Manufacturing Orders with heavyweight overhead — not suited for bag assembly workflows.多层BOM创建嵌套的生产单,带来沉重的管理负担——不适合箱包组装工作流程。

Solution解决方案

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制造工序流程

10
Cutting裁剪
Cutting裁剪
Outer fabric, Lining外料、里布
20
Interlining贴衬
Preparation准备
Foam, Non-woven海绵、无纺布
30
Sewing缝纫
Sewing缝纫
Thread, Adhesive线材、胶水
40
Hardware五金件
Hardware五金件
Eyelets, D-rings, Rivets鸡眼、D扣、爪钉
50
QC Inspection质检
QC质检
60
Packaging包装
Packaging包装
Packaging materials包装材料
09 — REFERENCE

Views & Reports视图与报表

Problem问题

Odoo's default BOM view is hierarchical and technical — difficult for factory staff to read and verify materials.Odoo默认BOM视图是层级式且技术化的——工厂人员难以阅读和核实材料。

Solution解决方案

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 前幅 主料贴加密1.0mm... Outer Leather Red fabric 0.14 Cutting裁剪
2 后幅 主料贴加密1.0mm... Outer Leather Red fabric 0.14 Cutting裁剪
3 内前幅 里布贴进口30g... Red Lining lining 0.12 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摘要、按类型的材料合计和成本估算。适合车间使用。

10 — REFERENCE

Costing成本核算

Problem问题

Overhead, freight, and duties must not be BOM lines — they would generate MRP demand and create phantom purchase orders.间接费用、运费和关税不能作为BOM行——它们会产生MRP需求并创建虚假采购订单。

Solution解决方案

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
11 — REFERENCE

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依赖模块

mrp mrp_plm quality mjb_lot_constraint

Out of Scope不在范围内

  • DXF import from CAD files (Phase 2)从CAD文件导入DXF(第二阶段)
  • Material mapping memory / learning (Phase 3)材料映射记忆/学习(第三阶段)
  • Multi-SKU per file import每个文件导入多个SKU