Modules / Production
Production (bills of materials and production orders)
Make your own products: write down what goes into each one and how it is made, plan what to make from what is ordered and sold, run production orders on the shop floor (issue the ingredients, record the time and what came out, including what was lost or scrapped), trace every batch back to its ingredients and forward to its customers, and see what each batch really cost against its standard.
People ask for it as: “we roast our own beans”, “bill of materials”, “recipe”, “production orders”, “works orders”, “batch”, “yield”, “weight loss”, “what did this batch cost”, “trace a batch”, “recall”, “MRP”
Who uses it
| Role | Does | Sees |
|---|---|---|
| Process engineer / head roaster | writes bills of materials and their versions, routings and work centres, the planned yield | every BOM, routing and work centre |
| Production planner | runs MRP-lite, firms planned orders, creates and releases production orders, enters forecasts | every plan and order |
| Roaster / production operator | issues components, records operation times, reports output, by-products and scrap with a reason, reverses their own wrong entries the same day | released orders of their work centres |
| Cost accountant | runs and approves cost roll-ups, releases standard costs to inventory, reviews and closes orders, explains variances | every order's cost |
| Quality / food safety lead | blocks a batch, runs a trace back to the ingredients and forward to the customers and shops | every lot's genealogy |
| The owner (or whoever the owner names) | holds the controls (over-issue tolerance, release with shortages, variance approval threshold, AI step modes), signs the migration reconciliation | everything |
| The system | runs MRP-lite on request or from the worker, explodes BOMs for pos and the planner, sends issues and receipts to inventory and postings to gl from pending rows, marks plans, roll-ups and unreleased orders stale, derives genealogy, loads an Odoo migration | everything, through its own service account |
What it has to do
Reference user stories. Each has a test written into it — the given / when / then — which becomes an automated check once it is built. Expect to keep some, change some and drop some.
Things people do
MFG-01As the head roaster, I want each work centre written down with its capacity and what an hour costs, so that orders are planned on real machines and costed at real rates.
Given gl company UK01, cost centre ROASTERY; inventory warehouse ROASTERY with locations ROASTERY/RAW, ROASTERY/WIP, ROASTERY/FG · when I create work centre ROASTER-1 (batch capacity 15.000 KGM, 8 hours a day, machine rate 45.0000 GBP an hour, labour rate 22.5000 GBP an hour, cost centre ROASTERY) and PACK-1 (labour 22.5000 an hour) · then work_centre_id is the customer's code, fixed once an order uses it; rates are NUMERIC(19,4) per hour, dated rows (a new rate from a later date, never edited in place); the cost centre must exist in gl (GET /cost-centres/{cost_centre}); a rate change marks every cost roll-up using it stale (MFG-18)
Process engineer / head roaster · screen: Work centres · reference: not built
MFG-02As the head roaster, I want a roast written as a bill of materials with its planned yield, so that 100 kg of green beans is planned to give 84 kg of roasted beans and the weight loss is costed into the product.
Given products GREEN-ETH (base unit KGM, lot-tracked, purchased), ROAST-ETH (KGM, lot-tracked, made), CHAFF (KGM, by-product, net realisable value 0.00) · when I write BOM ROAST-ETH usage production version 1, valid from 2026-11-16: output base quantity 84.000 KGM; component GREEN-ETH 100.000 KGM; by-product CHAFF 1.200 KGM; and release it · then the planned yield is 84.000 / 100.000 = 84.00%, shown, never typed separately; quantities are NUMERIC(19,4) in the product's production unit and convert exactly to its base unit (product GET /products/{product_id}/convert) or are refused; a component that is the output itself, directly or through another BOM, is refused (a cycle, found by a graph walk); valid_from is after today; a released version is never edited: a change is version 2 with its own valid_from, and two versions of one BOM never overlap in validity
Process engineer / head roaster · screen: Bills of materials · reference: not built
MFG-03As the head roaster, I want the steps to make a product (roast, cool, pack) written as a routing on work centres, so that time and cost are planned per batch.
Given BOM ROAST-ETH v1; work centre ROASTER-1 (15.000 KGM a batch) · when I write routing ROAST-ETH v1: op 10 roast on ROASTER-1, setup 10 minutes, run 20 minutes per batch of 15.000 KGM input; op 20 cool and degas, 12 hours waiting, no work centre time · then for 100.000 KGM input the plan is ceil(100 / 15) = 7 batches, 10 + 7 x 20 = 150 minutes on ROASTER-1, costed 2.5 h x (45.0000 + 22.5000) = 168.75 GBP; waiting time plans the date but costs nothing; the routing is versioned and dated like the BOM
Process engineer / head roaster · screen: Bills of materials · reference: not built
MFG-04As the head roaster, I want the packing of roasted beans into retail bags as its own BOM, so that a bag's cost and batch follow from the roast it came from.
Given ROAST-ETH; products BAG-ETH-250 (C62), POUCH-250 (C62), LABEL-ETH (C62) · when I write BOM BAG-ETH-250 usage production v1: output 1 C62; components ROAST-ETH 0.250 KGM, POUCH-250 1 C62, LABEL-ETH 1 C62; routing op 10 pack on PACK-1, run 1 minute per bag · then the BOM is a second level under ROAST-ETH; MRP-lite explodes BAG-ETH-250 demand into ROAST-ETH demand and then GREEN-ETH dependent requirements; the where-used of GREEN-ETH lists ROAST-ETH and BAG-ETH-250 (graph walk up)
Process engineer / head roaster · screen: Bills of materials · reference: not built
MFG-05As the head roaster, I want a drink's recipe written as a BOM of usage sale, so that the shops' tills take the right beans, milk and cup out of stock without anyone keeping a second recipe.
Given pos installed with recipe_source manufacturing; products LATTE-REG (sold, not stocked), ROAST-HOUSE, MILK-WHOLE, MILK-OAT, CUP-12OZ, LID-12OZ; modifier MOD-OAT · when I write BOM LATTE-REG usage sale v1 valid from 2026-12-01: output 1 C62; ROAST-HOUSE 0.018 KGM, MILK-WHOLE 0.250 LTR, CUP-12OZ 1, LID-12OZ 1; modifier MOD-OAT replaces MILK-WHOLE with MILK-OAT 0.250 LTR · then a usage-sale BOM is never produced: it has no routing and no production order, and is exploded at sale by pos (MFG-30); version and validity work as for production BOMs; pos's own recipe table becomes read-only once recipe_source is manufacturing
Process engineer / head roaster · screen: Bills of materials · reference: not built
MFG-06As the cost accountant, I want a standard cost rolled up from the BOM, the routing and the components' standard prices, so that a roasted kilo has a cost before the first order is closed.
Given UK01 on standard cost (inventory INV-48); GREEN-ETH standard 6.2000 GBP per KGM from 2026-11-01; BOM ROAST-ETH v1 (100.000 in, 84.000 out, CHAFF at 0.00); routing 168.75 for one batch run · when I run cost roll-up CR-2026-12 for UK01, effective 2026-12-01 · then ROAST-ETH = (100.000 x 6.2000 + 168.75 - 0.00 by-product value) / 84.000 = 788.75 / 84 = 9.3899 GBP per KGM (NUMERIC 19,4, divided once at the end), split material 7.3810 and conversion 2.0089 per KGM for variance analysis; BAG-ETH-250 rolls up from ROAST-ETH at 9.3899 x 0.250 plus its components and packing; a component with no standard price stops the run with the product named; the result is a proposal (status computed) until approved and released (MFG-07)
Cost accountant · screen: Costing · reference: not built
Usually different per customer: whether fixed overhead is absorbed in the work centre rates (IAS 2.13 on normal capacity) or expensed
MFG-07As the cost accountant, I want a second person to approve the roll-up before it becomes inventory's standard price, so that one mistyped rate does not revalue the stock.
Given CR-2026-12 computed by cost accountant A (sub a1) · when A tries to approve it under a second email; cost accountant B approves it and releases it · then A is refused (gate second_person); B's approval releases each product's standard to inventory as a dated standard price from 2026-12-01 (inventory's POST /standard-prices, INV-60), and inventory revalues stock on hand on that date (its INV-48); a roll-up that became stale before release (MFG-18) cannot be released; a released roll-up is never changed: the next is a new run
Cost accountant · screen: Costing · reference: not built
MFG-08As the planner, I want planned production orders proposed from what is ordered, what the shops will use and what is in stock, so that I firm a plan instead of building one.
Given warehouse ROASTERY on 2026-11-16; BAG-ETH-250: open sales-order lines 1,200 C62 due 2026-11-24 to 2026-11-29 (one ISO week; v2: was to 11-30, which weekly buckets split), on hand 300; planning rule for (BAG-ETH-250, ROASTERY) and (ROAST-ETH, ROASTERY): lot size weekly (the default), production days Monday to Friday; both make (product's site rows); ROAST-ETH: shop forecast 180.000 KGM a week (entered, until pos's demand history exists), on hand 60.000, safety stock 40.000 (product site data), lot size rounding multiple 84.000 KGM (product GET /products/{product_id}/round-proposal, role production) · when I run MRP-lite for 4 weeks · then BAG-ETH-250 net requirement 900 C62 gives one planned order of 900 due 2026-11-23 (one day before the first need, the routing's lead time); that needs 225.000 KGM ROAST-ETH, added to the shops' 720.000 for 4 weeks: gross 945.000, net of 60.000 on hand plus 40.000 safety stock gives 925.000, rounded UP to the next multiple of 84.000: 12 x 84.000 = 1,008.000 KGM (11 would be 924.000, 1.000 short), spread by week of need; each ROAST-ETH planned order publishes GREEN-ETH dependent requirements (100/84 of the output) for replenishment (MFG-27); planned orders are proposals: a re-run replaces the unfirmed ones and keeps the firmed ones. v2 (seemo's decided answer 6, SAP's MRP views per plant): the lot-size rule (daily | weekly | monthly), the production days and make-or-buy are per product and site rows, not code: a product on a daily rule nets each production day, a monthly one each calendar month; a due date that falls on a non-production day moves to the production day before
Production planner · screen: Planning · reference: not built
MFG-09As the planner, I want to firm a planned order and turn it into a production order, so that the plan the roastery works to does not move under it.
Given planned order ROASTERY:ROAST-ETH:2026-11-16:run 7 for 84.000 KGM · when I firm it and convert it · then production order UK01-MO-2026-00118 for 84.000 KGM ROAST-ETH, due 2026-11-16, BOM v1 and routing v1 named (copied at release), status created; the planned order is converted and never proposed again; a second convert is refused (already converted, the order named); a production order can also be created by hand with the same fields
Production planner · screen: Planning · reference: not built
MFG-10As the planner, I want to release an order only when its BOM and routing are valid and its components are there, so that the roaster never starts a batch that cannot finish.
Given UK01-MO-2026-00118 created; GREEN-ETH available 140.000 KGM at ROASTERY (inventory GET /availability); ROASTER-1 load on 2026-11-16: 5.5 of 8 hours · when I release it on 2026-11-16 · then the BOM v1 and routing v1 are copied onto the order (frozen); planned component 100.000 KGM GREEN-ETH is available; the 2.5 hours fit (8.0 hours capacity); the order is released; a shortage refuses the release unless release_with_shortage is on (then a warning is recorded); a capacity overload warns, never blocks (lean: no finite scheduling); a released order never returns to created
Production planner · screen: Orders · reference: not built
MFG-11As the roaster, I want to issue the green beans I put in the roaster by scanning their lot, so that stock and the batch's ingredients are right.
Given UK01-MO-2026-00118 released; GREEN-ETH lot G-2611-ETH-07 at ROASTERY/RAW 140.000 KGM; over_issue_tolerance 5% · when I issue 100.000 KGM of lot G-2611-ETH-07, and later 3.000 more; then I try to issue 4.000 more · then each issue is sent to inventory from a pending row with its own move_ref mfg:UK01-MO-2026-00118:issue:1:<seq> (seq 1, 2), moving stock to the order's WIP and posting WIP against stock valuation at inventory's value (620.00 for 100.000 at standard 6.2000); the 3.000 is within 5% (105.000 total allowed) and recorded as over-issue; the 4.000 more (107.000) is refused above tolerance; the lots issued are kept on the order for genealogy; quantities zero or negative are 422
Roaster / production operator · screen: Orders · reference: not built
MFG-12As the roaster, I want to record how long each step took, so that the batch carries the cost of the roaster and my time.
Given op 10 of UK01-MO-2026-00118 planned 150 minutes · when I confirm op 10 with 160 minutes (machine and labour), final · then confirmation UK01-MO-2026-00118:10:1 costs 160 / 60 x (45.0000 + 22.5000) = 180.00 GBP, posted to gl from a pending row: debit wip 180.00 (the order), credit activity_absorption 180.00 (cost centre ROASTERY), source_document "UK01-MO-2026-00118:activity:10:1" (the confirmation itself), journal_id derived_id(source_document, "activity") (v2: gl's one rule; the order alone would give every confirmation one id); a second confirmation of op 10 is :2 with its own journal; a wrong one is reversed by a mirror confirmation (source_document "UK01-MO-2026-00118:activity:10:1:reverse"), never edited
Roaster / production operator · screen: Orders · reference: not built
MFG-13As the roaster, I want to report the roasted beans that came out, with their new batch number, and the chaff, so that the stock exists and its weight loss is visible.
Given UK01-MO-2026-00118: 100.000 KGM green issued (the 3.000 over-issue reversed), planned output 84.000 KGM · when I report 82.500 KGM ROAST-ETH as lot R-20261116-01 at ROASTERY/FG and 1.100 KGM CHAFF, final · then the output is received through inventory (move_ref mfg:UK01-MO-2026-00118:output:1) at standard 9.3899 = 774.67 GBP (82.500 x 9.3899, rounded once), WIP credited; the chaff is received at 0.00 (net realisable value, IAS 2.14) as its own move (mfg:...:byproduct:1:1); the yield is 82.50% against 84.00% planned, shown on the order; the output lot names its input lot G-2611-ETH-07 (genealogy, MFG-16); a report above 110% of plan is refused as a typo unless the planner confirms it
Roaster / production operator · screen: Orders · reference: not built
MFG-14As the roaster, I want to report a burnt batch as scrap with a reason, so that the loss is seen as a loss and not hidden in the yield.
Given UK01-MO-2026-00119: 100.000 KGM GREEN-ETH issued (620.00); planned output 84.000 · when I report 78.000 KGM good output and 6.000 KGM scrapped with reason BURNT (a roast that went too far) · then good output is received at standard (78.000 x 9.3899 = 732.41); the 6.000 KGM scrap is recorded on the order with its reason and never received; at close its standard value (6.000 x 9.3899 = 56.34) is posted as abnormal_scrap, an expense (IAS 2.16), and only the rest of the WIP balance is the usage variance; scrap above scrap_approval_threshold (50.00 at standard) needs the planner's approval, never the operator's own (v2: permission mfg:scrap:approve, held by the planner; the approver is not the reporter, email AND sub)
Roaster / production operator · screen: Orders · reference: not built
MFG-15As the cost accountant, I want to close an order with its variance split and posted once, so that each batch's cost against standard is in the books and explained.
Given UK01-MO-2026-00118 completed: WIP debit 620.00 (components) + 180.00 (activity) = 800.00, credit 774.67 (output at standard); standard for 82.500 KGM output: material 82.500/84.000 x 620.00 = 608.93, conversion = 774.67 - 608.93 = 165.74, the rest of the output's standard value · when I close it on 2026-11-18, and the close is retried after a timeout · then WIP balance 25.33 posted as material_usage_variance 11.07 (620.00 - 608.93, including the 1.500 KGM below planned yield) and activity_variance 14.26 (180.00 - 165.74), journal_id derived_id("UK01-MO-2026-00118", "settle") (one per order), crediting wip 25.33 so the order's WIP is exactly 0.00; the split always sums to the balance (the rounding difference goes to the last category); on an average-cost company the balance instead goes to inventory as a valuation adjustment on what is still on hand from the order (inventory's POST /valuation-adjustments, source_kind production_settlement), the rest to cost of sales; the retry is gl's replay; a closed order never reopens: a late cost is a post-close adjustment order line, settle:2
Cost accountant · screen: Orders · reference: not built
MFG-16As the quality lead, I want to trace a batch of green beans forward to every roasted batch, bag, shop and customer, and a bag back to its beans, so that a recall takes minutes.
Given green lot G-2611-ETH-07 issued to UK01-MO-2026-00118 (output R-20261116-01) and UK01-MO-2026-00121 (output R-20261117-02); R-20261116-01 packed into BAG-ETH-250 lot B-20261117-01; bags delivered to 3 customers and shipped to 4 shops · when I trace G-2611-ETH-07 forward, and B-20261117-01 back · then the genealogy graph (input lot -> order -> output lot) answers forward R-20261116-01, R-20261117-02, B-20261117-01, and for each output lot inventory's GET /lots/{product_id}/{lot_code}/trace answers where it went (customers, shops, on hand); back from B-20261117-01 to R-20261116-01 to G-2611-ETH-07 and its supplier receipt; nothing unaccounted; the trace is derived from the orders' issues and outputs, never typed (Regulation (EC) No 178/2002 art. 18)
Quality / food safety lead · screen: Traceability · reference: not built
MFG-31As the owner, I want the controls on the shop floor held by me, so that a planner cannot release orders with missing beans or widen the over-issue tolerance.
Given over_issue_tolerance 5%, release_with_shortage off, scrap_approval_threshold 50.00 · when a planner tries to switch release_with_shortage on; I raise the tolerance to 8% from 2026-12-01 · then the planner is refused (mfg:settings:controls); mine is a dated row after today
The owner (or whoever the owner names) · screen: Settings · reference: not built
MFG-32As the owner moving off Odoo, I want the bills of materials, work centres and the open and closed production orders carried and reconciled, so that I can sign that nothing was lost.
Given Odoo 17 mrp with 42 BOMs, 3 work centres, 6 open and 380 done orders in 2025 and 2026; inventory's and product's migrations signed · when the migration loads, reconciles and I sign · then BOMs become released versions (version 1 valid from the cut-over), work centres with their costs_hour as rates, done orders as read-only closed history with their lots, open orders finished in Odoo first (recommended) or re-created here as created orders; counts and output quantities per product and month equal Odoo's
The owner (or whoever the owner names) · screen: Migration · reference: not built
Things that happen on their own
MFG-17on request from Planning, or from the composition's worker (no server-side scheduler)The system runs MRP-lite, so that planned orders follow demand without a planner rebuilding the plan.
Given the demand, stock, site data and BOMs of MFG-08 · when the run starts, and starts again while the first is running · then the run takes run_no n+1 with a plain INSERT (the second start loses with 23505 and answers "a run is in progress"); it explodes level by level (low-level code from the BOM graph), nets, rounds through product, and writes planned orders keyed [warehouse_id, product_id, need_date, run_no]; unfirmed orders of run n are superseded, firmed ones kept; the result is marked stale as soon as a sales order, forecast, stock or BOM changes after the run (MFG-18)
· reference: not built
MFG-18when a BOM version, routing, work centre rate, component standard price, demand or stock changesThe system marks plans, cost roll-ups and unreleased orders stale, so that nobody releases or costs from yesterday's data.
Given CR-2026-12 computed; BOM ROAST-ETH v2 released valid from 2026-12-01 with output 85.000 KGM · when v2 is released · then CR-2026-12 (which used v1 for 2026-12-01) is stale and cannot be released; unreleased orders due on or after 2026-12-01 show "BOM v2 now valid"; released orders keep their frozen v1; the last MRP run shows stale with the cause
· reference: not built
Things that cross into other modules
MFG-20when an issue, output, by-product or reversal is recordedComponents leave and output enters stock through inventory, which owns the move, the lot and its value.
Given an issue or output row committed with its move_ref · when the outbox dispatches it, twice · then inventory records the move, values it and posts WIP against stock itself; the repeat is inventory's replay on move_ref; manufacturing keeps the move id and value, never writes inv_ tables
· owned by inventory · reference: not built
MFG-21when an activity is confirmed and when an order is settledActivity absorption, scrap and variances post to gl.
Given a committed confirmation or settlement · when manufacturing posts · then gl posts the balanced journal and answers replay for the same body
· owned by gl · reference: not built
MFG-22when a BOM is written, at planning and at costingProducts, units, conversions, site planning data and rounding come from product.
Given ROAST-ETH with production unit KGM and site ROASTERY procurement make · when manufacturing reads it · then it reads the product, converts through product and rounds lot sizes through product; it stores none of them
· owned by product · reference: not built
MFG-23when MRP-lite reads demandOpen sales-order lines are demand.
Given open lines for BAG-ETH-250 · when MRP-lite runs · then it reads the open quantity per product, warehouse and date from sales-order; it never reads so_ tables
· owned by sales-order · reference: not built
MFG-27when replenishment reads demandComponent demand from planned and released orders is published for inventory's and purchasing's replenishment.
Given planned orders needing 1,200.000 KGM GREEN-ETH in four weeks · when inventory's replenishment asks · then manufacturing answers the dependent requirements per component, warehouse and date; it never raises a purchase request
· owned by manufacturing · reference: not built
MFG-30when pos sells a product whose recipe source is manufacturingA usage-sale BOM is exploded for a till, so that the shop's stock follows what was sold.
Given BOM LATTE-REG usage sale v1 valid from 2026-12-01 · when pos asks for 1 LATTE-REG with MOD-OAT on 2026-12-02 · then manufacturing answers bom_id LATTE-REG:sale, version 1 and components ROAST-HOUSE 0.018 KGM, MILK-OAT 0.250 LTR, CUP-12OZ 1, LID-12OZ 1; the same request answers the same; manufacturing never calls pos
· owned by manufacturing · reference: not built
How things move
bom_version
draft → released → obsolete
- none → draft by process_engineer · when quantities convert exactly; no cycle (graph walk); components stocked or phantom
- draft → released by process_engineer · when valid_from after today; no overlap with another released version of the BOM · cost roll-ups and unreleased orders using the BOM marked stale (MFG-18)
- released → obsolete by process_engineer · when no unreleased order or firmed plan names it after valid_to · needs valid_to
production_order
created → released → in_progress → completed → closed → cancelled
- none → created by planner or system · when a released BOM and routing valid on the due date · production_order_id claimed from the company's yearly series
- created → released by planner · when components available (or release_with_shortage); BOM and routing valid on the release date · BOM and routing copied onto the order and frozen
- released / in_progress → in_progress by operator · when within over_issue_tolerance; the lot available · inventory issue from a pending row (MFG-11)
- released / in_progress → in_progress by operator · activity journal from a pending row (MFG-12)
- released / in_progress → in_progress by operator · when at most 110% of plan unless confirmed · inventory receipt of the output lot and by-products (MFG-13)
- in_progress → in_progress by operator · when the entry not reversed already; the operator's own entry on the same business date, else a planner · needs reason · a mirror movement with its own ref (…:reverse); v2: an output or by-product goes back out through inventory POST /goods-issues/from-source, source_kind production_output_reversal (inventory v7), an issue comes back as a receipt naming reverses_move_ref
- in_progress → completed by operator or cost_accountant · no further issues or outputs; costs may still arrive
- completed → closed by cost_accountant · when every pending outbox row of the order sent; a variance above variance_approval_threshold approved by another person (email AND sub) · scrap and variances posted, WIP 0.00 (MFG-15)
- created / released → cancelled by planner · when no movement or confirmation recorded · needs reason
planned_order
proposed → firmed → converted → superseded
- none → proposed by system
- proposed → firmed by planner · kept by later runs
- proposed / firmed → converted by planner · production order created (MFG-09)
- proposed → superseded by system
cost_rollup
computed → approved → released → stale
- none → computed by cost_accountant · when every component has a standard price on the effective date
- computed → approved by cost_accountant · when the approver did not run it (email AND sub)
- approved → released by cost_accountant · when not stale; effective date after today · standard prices handed to inventory from pending rows
- computed / approved → stale by system · when an input changed (MFG-18)
mfg_migration_run
loaded → reconciled → signed → discarded
- none → loaded by system · when product and inventory migrations signed · v2 (pattern §11, seemo's decided answer 4): staging rows only (mfg_migration_row, keyed by the source id); nothing written to the ledger, balances or journals
- loaded → reconciled by system
- reconciled → signed by owner · when every check equal or explained · v2 (decided answer 4): the staged rows written through this module's normal use cases, idempotent on the source key; the first write to the ledger; a signed run is later reversed by reversing entries, never deleted
- loaded / reconciled → discarded by owner · needs reason · v2 (decided answer 4): the run's staging rows deleted, nothing else (no ledger row was written)
What it keeps
| Thing | Meaning | Identified by | Shared? |
|---|---|---|---|
| work centre | a machine or a bench where work is done and costed | work_centre_id VARCHAR (ROASTER-1) | SHARED, sole writer |
| work centre rate | what an hour of a work centre costs, by kind, from a date | work_centre_idrate_kind (machine | labour | overhead)valid_from | module-owned |
| bom | what goes into one product (production) or what one sold product consumes (sale) | bom_id = "<product_id>:<usage>[:<alternative>]" (ROAST-ETH:production) | SHARED, sole writer (pos reads usage sale) |
| bom version | one dated version of a BOM, released or not | bom_idversion | module-owned |
| bom line | one component, by-product or modifier rule of a BOM version | bom_idversionline_no | module-owned |
| routing | the steps to make a product, on work centres, dated and versioned | product_idrouting_version | module-owned |
| production order | an instruction to make a quantity of a product by a date, and its record of what happened | production_order_id = "<company_code>-MO-<yyyy>-<nnnnn>" (claimed from the company's yearly series; migrated odoo:<db>:mrp.production:<id>) | module-owned |
| order movement | one issue, output, by-product or reversal on an order, as sent to inventory | move_ref = "mfg:<production_order_id>:<issue | output | byproduct>:<line_no>:<seq>[:reverse]" | module-owned |
| confirmation | time recorded on one operation of an order | production_order_idop_noconfirmation_no | module-owned |
| scrap | output lost with a reason, expensed as abnormal loss | production_order_idscrap_no | module-owned |
| settlement | the close of an order: scrap and variances posted, WIP to zero | production_order_idsettlement_no | module-owned |
| lot genealogy | which input lots went into which output lot, through which order | output_product_idoutput_lot_codeinput_product_idinput_lot_codeproduction_order_id | module-owned (derived from order movements; also graph edges lot -> order -> lot) |
| planned order | a proposal from MRP-lite to make something by a date | warehouse_idproduct_idneed_daterun_no | module-owned |
| dependent requirement | a component needed by a planned or released order on a date | warehouse_idproduct_idneed_datesource_ref | module-owned (derived per run; read by replenishment) |
| forecast | demand entered by the planner (the shops' weekly use, until pos publishes it) | warehouse_idproduct_idweek_start | module-owned |
| cost rollup | a standard-cost calculation for a company and effective date | rollup_id = "<company_code>-CR-<yyyy>-<mm>[-<n>]" | module-owned |
| outbox | a side effect waiting for a neighbour after the local commit | targetref | module-owned |
| settings | the controls and defaults, dated | keyvalid_from | module-owned |
A production module that keeps its own stock of components, its own item master or its own standard prices is how the roastery's kilos and the books' kilos disagree. Stock and its value are inventory's; the item is product's; manufacturing owns only the recipe, the route and the order.
What runs on its own
| Story | When | What |
|---|---|---|
| MFG-17 | on request, or from the composition's worker | MRP-lite |
| MFG-18 | when an input changes | mark roll-ups, plans and unreleased orders stale |
| MFG-20 | after each movement commits | dispatch pending outbox rows to inventory and gl |
Questions that shape your version
Read these out and let the customer correct one — people rarely recall a policy on demand and can always react to one. Standard is a named authority you can look up and hold us to. Commonly seen is exactly that: arrangements we have met, with no survey behind them. A customer doing none of them is not doing it wrong.
- Is the weight lost in roasting normal (part of the cost of roasted beans), and how much is normal?
Standard IAS 2 para 16 (abnormal waste expensed), para 10-12 (normal loss in the cost of conversion)
- specialty roaster
- 15 to 18% loss, planned per origin and roast profile
- commodity roaster
- 12 to 15% loss
- What is chaff (or another by-product) worth to you, and do you sell it?
Standard IAS 2 para 14 (by-products at net realisable value, deducted from the main product's cost)
- Do your machine and labour rates include overheads (rent, energy), and on what capacity?
Standard IAS 2 para 12-13 (fixed overhead on normal capacity; unallocated overhead expensed)
- Is your stock valued at standard or at average cost?
- How far ahead do you plan, and do the shops' sales drive the roastery?
- Who may release an order when beans are short, and how much over the plan may a roaster issue?
What you can change yourself
These are settings, not code: someone in your team changes them on a screen, without a developer and without a release.
- how the shop floor is controlled; every row dated (valid_from after today; the first row of a key may start today)
- each AI step's mode (ai_steps: off | suggest)
- what an hour of each work centre costs
- scrap reasons (BURNT, UNDER_ROASTED, SPILLED) and whether each is abnormal
- the weekly demand the planner enters
- how MRP-lite buckets and schedules one product at one site; a product with no row takes the defaults
Where the platform limits what we can promise
No read-your-writes inside an open transaction. a movement commits, then its WIP balance and genealogy are derived in a second transaction
graph_khop() takes an integer-literal start node and resolves only as a top-level SELECT. BOM and genealogy walks start from a node id derived from the product or lot key, one walk per query; cycles are checked by a walk from the new component before release
A plain INSERT of a committed key is rejected (23505). order numbers, MRP run numbers, confirmations and settlements are plain INSERTs; the loser re-reads
For builders
- Module spec — this page, for agents
- The lifecycle and the design template
Code
Public repositories, anonymous clone, one release tag each. Read README.md and AGENTS.md first.
- erp-brick-manufacturing (brick, v0.2.0)
git clone --depth 1 --branch v0.2.0 https://git.dodil.io/dodil/erp-brick-manufacturing.git
ssh:[email protected]:dodil/erp-brick-manufacturing.git - erp-platform (platform, v0.9.13)
git clone --depth 1 --branch v0.9.13 https://git.dodil.io/dodil/erp-platform.git
ssh:[email protected]:dodil/erp-platform.git
Known gaps in the reference
- nothing is built; this is version 1 of the spec, unsigned
- the needs above are change requests in inventory, product, sales-order and gl
- no finite scheduling, no co-products with a cost split, no quality inspection lots (extension points)
- APQC ids are null until verified against PCF v8.0