Back

What is the Manufacturing Module?

The Manufacturing module helps you plan and track production from start to finish. You can define how products are made (Bill of Materials), assign work to machines (Work Centers), and monitor every step of the production process through Manufacturing Orders and Job Orders.

The core_manuf module implements a multi-level manufacturing workflow built on Django models with HMX framework extensions. It depends on base, core_product, core_hr, and webx_widget. Key capabilities include hierarchical BoM with multi-operation support, finite-capacity WC scheduling (08:00–16:00 Mon–Fri), async scheduling via Celery with sync fallback, priority-based queue management, and job order splitting with material redistribution.

📋

Bill of Materials

Define product recipes — materials, operations, and outputs

🏭

Work Centers

Set up machines and areas where production happens

📦

Manufacturing Orders

Create and track production orders from start to finish

🔧

Job Orders

Track each operation step on the production floor

📅

Scheduling

Automatic scheduling across work centers

📝

Production Records

Record output quantities, quality, and time

📋

Bom

BoM with operations, materials, byproducts, cost summary

🏭

WorkCenter

WC with service/labor/molding costs, capacity, OEE

📦

ManufOrder

MO with auto-sequence, priority, Celery scheduling

🔧

ManufJobOrder

MJO with start/pause/done, split, Gantt aliases

📅

ManufWcSchedule

Finite-capacity scheduling engine, 480min/day

👤

ManufMjoOperator

Operator assignment with conflict detection

Production Process Flow

Create BoM
Setup Work Centers
Create MO
Confirm & Schedule
Execute Job Orders
Record Production

MO Status Flow

Draft
Confirmed
In Progress
Partially Done
Done
Closed

Cancel is available from any status (except Done/Closed)

MJO Status Flow

Planned
Waiting Material/MJO
Ready
In Progress
Paused
Done

Prerequisites

  • Products must be created in the Inventory module first (raw materials and finished goods)
  • At least one Work Center must be configured
  • If using operator tracking, employees must be registered in HR module
  • Your user account must have a Manufacturing role assigned (Super User, Manager, Production Planner, or Operator)

First-Time Setup Steps

Set Up Work Centers

Go to Manufacturing > Master Data > Work Centers. Create at least one Work Center (e.g., your main production machine). Set its capacity, setup time, and efficiency.

Manufacturing > Work Centers > Create
Work Centers › New
AD
Code *
WC-001
Name *
CNC Milling Machine #1
Type
Machine
Capacity
1
Setup Time
15 min
Efficiency
95%
Create a Work Center with capacity, setup time, and efficiency

Define Work Center Costs

On each Work Center, add service costs and labor costs in the cost tabs. Choose whether each cost is based on quantity produced or duration of work.

Work Centers › WC-001
AD
Service CostsLabor CostsMolding
Service ProductCost BasisCost/Unit
ElectricityDurationIDR 15,000/hr
Add service and labor costs in the cost tabs

Create a Bill of Materials

Go to Manufacturing > Bill of Materials > Create. Add your finished goods in the Output tab, define operations with their work centers and durations, and assign materials to each operation.

Manufacturing > Bill of Materials > Create
Bill of Materials › New BoM
AD
Code
BOM-0042
Name
Steel Frame Assembly
OutputOperationsMaterialsByproducts
BoM form — add outputs, operations, and materials in tabs

Create a Manufacturing Order

Go to Manufacturing > Manufacturing Orders > Create. Select your BoM, set the planned quantity, and specify the requested start date. The system will auto-populate materials and job orders.

Manufacturing > Manufacturing Orders > Create
Manufacturing Orders › New MO
AD
Bill of Materials
BOM-0042
Planned Quantity
500 pcs
Start Date
📅 2026-04-10
Priority
Normal
Select BoM, set quantity and schedule — materials auto-populate

Confirm & Start Production

Click "Confirm" on the Manufacturing Order. The system will automatically schedule Job Orders across Work Centers. Operators can then start, pause, and complete each Job Order.

Manufacturing Orders › MO-2026-0089
AD
MO-2026-0089 Confirmed
✅ Confirm
DraftConfirmedIn ProgressDone
Auto-Scheduled Job Orders
JOOperationWork CenterStatus
JO-0200CuttingWC-002Planned
JO-0201WeldingWC-005Planned
After confirmation — Job Orders are auto-created and scheduled

Technical Setup

Module Dependencies

# __hmx__.py manifest
{
    "name": "Core_Manuf",
    "depends": ["base", "core_product", "core_hr", "webx_widget"],
    "data": [
        "security/manuf_groups.xml",
        "security/base.model.access.csv",
        "data/manuf_order_sequence_data.xml",
        ...
    ]
}

Auto-Sequences

ModelSequence CodeExample
ManufOrdermanuf.orderMO/2026/0001
ManufRecordmanuf.recordMRC/2026/0001
ManufWcSchedulemanuf.wc.scheduleWCS/2026/0001
ManufSplitJobOrdermanuf.split.job.orderSJO/2026/0001

Key Computed Fields

ModelFieldDepends On
ManufOrderexpected_durationbom_id.operation_ids.duration
ManufOrderdate_scheduled_startMJO scheduled starts (min)
ManufOrderdate_scheduled_endMJO scheduled ends (max)
ManufOrderdelay_flagscheduled_start vs requested_start
ManufJobOrdernameMO code + operation name
ManufJobOrderstart_date/end_dateGantt aliases for scheduled dates
HrEmployeeavailability_statusActive operator assignments

What is a Bill of Materials?

A Bill of Materials (BoM) is like a recipe for making a product. It tells the system: what raw materials are needed, what steps (operations) to follow, which machines (work centers) to use, and what finished products come out at the end.

💡A single BoM can produce multiple finished goods and byproducts. You can also set version numbers to track changes over time.

How to Create a BoM

Open Bill of Materials

Navigate to Manufacturing > Master Data > Bill of Materials, then click "Create".

Manufacturing > Bill of Materials > Create
Master Data › Bill of Materials
AD
All+ Create
CodeNameVersionForecast CostExec. Mode
BOM-0042Steel Frame Assemblyv2IDR 1,250,000Sequential
BOM-0038PCB Controller Boardv1IDR 850,000Sequential
BOM-0055Hydraulic Cylinder HX-200v1IDR 3,200,000Parallel
BoM list view — click "Create" to add a new Bill of Materials

Fill in Basic Information

Enter the BoM Code, BoM Name, and Version number. Select your Branch and Company.

Bill of Materials › New BoM
AD
BoM Details
Code *
BOM-0042
Name *
Steel Frame Assembly
Version
2
Branch
Main Branch
Fill in Code, Name, and Version — these identify the BoM

Configure Production Rules

Set the Production Start Rule (when can production begin?), Operation Execution Mode (sequential or parallel), and Material Consumption Policy.

Bill of Materials › BOM-0042
AD
Production Configuration
Product Start Rule
When MO Confirmed
Operation Execution Mode
Sequential
Material Consumption Policy
Manual
Reject Cost Allocation
Distribute to Output
Configure how production runs — start rules, execution mode, and cost allocation

Add Finished Goods (Output Tab)

In the Output tab, add the products that will be produced. Specify the quantity and optionally set a rejected product variant for quality control.

Bill of Materials › BOM-0042
AD
OutputOperationsMaterialsByproducts
#ProductQuantityUoMAllocated CostReject Product
1Steel Frame Assembly A11pcsIDR 1,250,000Steel Frame A1 — Reject
+ Add Output
Output tab — define finished goods and optional reject product variants

Define Operations

Add operations — each operation has a name, a Work Center, and an estimated duration in minutes.

Bill of Materials › BOM-0042
AD
OutputOperationsMaterialsByproducts
SeqOperation NameWork CenterDuration (min)
10CuttingWC-002 — Laser Cutting Station120
20WeldingWC-005 — Welding Station A240
30AssemblyWC-003 — Assembly Line A180
40CoatingWC-004 — Paint Booth #290
+ Add Operation
Operations tab — each operation links to a Work Center with estimated duration

Assign Materials to Operations

For each operation, add the raw materials needed. Specify the product and quantity. The unit of measure is automatically pulled from the product.

Bill of Materials › BOM-0042
AD
OutputOperationsMaterialsByproducts
#OperationMaterialQuantityUoMUnit Cost
1CuttingSteel Rod 10mm5pcsIDR 45,000
2WeldingWelding Wire 1.2mm0.1kgIDR 180,000
3AssemblyBolt M8x258pcsIDR 2,500
4CoatingAnti-Rust Coating0.24literIDR 85,000
+ Add MaterialTotal: IDR 411,400
Assign materials to specific operations with quantity and cost

Add Byproducts (Optional)

If any operation produces secondary products, add them as byproducts with their quantities and allocated costs.

Bill of Materials › BOM-0042
AD
OutputOperationsMaterialsByproducts
#OperationProductQuantityUoMAllocated Cost
1CuttingSteel Scrap0.5kgIDR 5,000
+ Add Byproduct
Byproducts tab — secondary products from operations with cost allocation

Production Rules Explained

RuleOptionsWhen to Use
Production Start RuleAll Materials Available / At Least One Available / Start ImmediatelyControls when production can begin relative to material availability
Operation Execution ModeSequential / ParallelSequential: operations run one after another. Parallel: all operations start at the same time.
Material ConsumptionBlock / Allow With Warning / Allow Without WarningControls what happens when consumed quantity differs from planned
Reject Cost AllocationRecorded / Transferred to Finished GoodHow rejected product costs are handled

BoM Technical Reference

Model: bom

FieldTypeDetails
codeCharField(255)BoM Code
nameCharField(255)BoM Name
versionCharField(50)Version string
forecast_costDecimal(16,2)Estimated total cost
product_start_ruleCharField(50)all_material_available | at_least_one_available | start_immediately
operation_execution_modeCharField(50)sequential | parallel
material_consumption_policyCharField(50)block | allow_with_warning | allow_without_warning
reject_cost_allocationCharField(50)recorded | transferred_to_finished_good
branch / companyFKMulti-company support

Related Models

ModelKeyRelationKey Fields
bom_outputoutput_idsBoM → Finished Goodsproduct_fg, quantity, allocated_cost, rejected_product
operationoperation_idsBoM → Operationsname, duration, work_center
materialmaterial_idsOperation → Materialsproduct, quantity, uom (computed). Unique product per operation constraint.
byproductbyproduct_idsOperation → Byproductsproduct, quantity, allocated_cost

Cost Summary Engine

The _compute_summary_widget_json method builds a comprehensive cost breakdown as JSON, including:

  • Finished goods costs with allocated_cost_percent per output line
  • Material costs: quantity × product.standard_price
  • WC costs: resolved via _find_workcenter_by_label, then service_cost_ids and labor_cost_ids are iterated with duration/quantity-based calculation
  • Byproduct costs deducted from total
  • Linked BoM navigation via product_bom_cache
💡BoM cannot be deleted if manuf_order_bom_ids exists (referenced by any MO).

ERD

Bom
PK id
code, name, version
product_start_rule
operation_execution_mode
forecast_cost
BomOutput
FK bom
FK product_fg
quantity, allocated_cost
FK rejected_product
Operation
FK bom
name, duration
FK work_center
Material
FK operation
FK product
quantity, uom (computed)
ByProduct
FK operation
FK product
quantity, allocated_cost

What is a Work Center?

A Work Center is a machine, production line, or work area where manufacturing operations happen. Each Work Center has its own capacity, costs, and schedule. The system uses this information to plan when and where each operation will be performed.

How to Create a Work Center

Open Work Centers

Navigate to Manufacturing > Master Data > Work Centers, then click "Create".

Manufacturing > Work Centers > Create
Master Data › Work Centers
AD
AllMachineArea+ Create
CodeNameTypeCapacityEfficiencyOEE Target
WC-001CNC Milling Machine #1Machine1
95%
85%
WC-003Assembly Line AArea8
78%
75%
WC-005Welding Station AMachine3
91%
85%
Work Center list — filter by Machine or Area type

Enter Basic Details

Fill in the Work Center Code (must be unique), Name, and Type (Machine or Area). You can also upload an image and link an asset product.

Work Centers › New Work Center
AD
Basic Details
Code *
WC-005
Name *
Welding Station A
Type *
Machine
Asset Product
Welding Machine Lincoln V350
Enter Code (must be unique), Name, and Type — Machine or Area

Set Capacity & Efficiency

Set the Capacity (parallel units, minimum 1), Efficiency percentage (0–100%), OEE Target, and Setup/Teardown times in minutes.

Work Centers › WC-005
AD
Capacity & Performance
Capacity (parallel units)
3
Efficiency (%)
91%
OEE Target (%)
85%
Setup Time (minutes)
10
Teardown Time (minutes)
10
Set capacity, efficiency, OEE target, and setup/teardown times

Add Service Costs

In the Service Costs tab, add cost items. For each, select a service product, choose whether the cost is based on quantity or duration, and enter the cost per unit.

Work Centers › WC-005
AD
Service CostsLabor CostsMolding
#Service ProductCost BasisCost per Unit
1Electricity — WeldingDurationIDR 15,000 /hour
2Gas Supply — ArgonQuantityIDR 8,500 /unit
+ Add Service Cost
Service Costs tab — choose cost basis: by quantity or duration

Add Labor Costs

In the Labor Costs tab, add labor cost lines with cost rates. These will be used to calculate manufacturing costs in the BoM summary.

Work Centers › WC-005
AD
Service CostsLabor CostsMolding
#DescriptionCost Rate
1Welder — SeniorIDR 75,000 /hour
2Welder — JuniorIDR 45,000 /hour
+ Add Labor Cost
Labor Costs tab — rates used for BoM cost summary calculation
A Work Center cannot be deleted if it is used in any Bill of Materials operation.

WorkCenter Technical Reference

Model: workcenter

FieldTypeConstraints
codeCharField(255)Unique across all WCs
nameCharField(255)Required
typeCharFieldmachine | area
capacityFloatMust be ≥ 1.0
efficiencyFloat0 < value ≤ 100
oee_targetFloat0 ≤ value ≤ 100
setup_timeFloatMinutes
teardown_timeFloatMinutes
imageImageFieldOptional

Cost Models

ModelFieldsPurpose
service_cost_workcenterproduct_service_id (service type), based_on (quantity|duration), costMachine operation costs
labor_cost_workcenterproduct_service_id, based_on, cost, labor_idLabor costs per worker/role
molding_workcenterproduct_service_idMolding/tooling costs

Performance Metrics (Read-only)

oee_percentage, lost_percentage, load_percentage, performance_percentage — stored fields for OEE dashboard display.

What is a Manufacturing Order?

A Manufacturing Order (MO) is your instruction to produce a specific quantity of a product. It links to a Bill of Materials and automatically generates the Job Orders (one per operation) needed to complete the production.

Draft
Confirmed
In Progress
Done

How to Create a Manufacturing Order

Open Manufacturing Orders

Navigate to Manufacturing > Manufacturing Orders, then click "Create". The system will automatically assign an MO code.

Manufacturing > Manufacturing Orders > Create
Manufacturing › Manufacturing Orders
AD
Total Orders
142
In Progress
23
Pending
8
Delayed
5
AllDraftIn Progress+ New Order
MO NumberProductBoMQtyPriorityStatusProgress
MO-2026-0089Steel Frame Assembly A1BOM-0042 v2500CriticalIn Progress
72%
MO-2026-0088PCB Controller Board Rev.3BOM-0038 v11,200HighDone
100%
MO-2026-0087Hydraulic Cylinder HX-200BOM-0055 v180NormalIn Progress
35%
MO-2026-0086Aluminum Enclosure C-TypeBOM-0061 v3300NormalDraft
0%
Showing 1–4 of 142
1
2
3
Manufacturing Order list with status filters, priority, and progress tracking

Select Bill of Materials

Choose the BoM for the product you want to manufacture. The system will automatically populate the planned quantity, materials list, and job orders based on the BoM.

Manufacturing Orders › New MO
AD
General Information
Bill of Materials
BOM-0042 — Steel Frame Assembly v2
Product (auto-filled)
Steel Frame Assembly A1
Planned Quantity
500 pcs
Branch
Main Branch
Select a BoM — product, quantity, and materials are auto-populated

Adjust Quantity

Modify the planned quantity if needed. Material quantities and job order durations will automatically recalculate based on the ratio from the BoM output.

Manufacturing Orders › MO-2026-0089
AD
Quantity & Materials
Planned Quantity
500 pcs
BoM Output Quantity
1 pcs (ratio: 500x)
Auto-Calculated Materials
MaterialPer UnitTotal QtyUoM
Steel Rod 10mm52,500pcs
Welding Wire 1.2mm0.150kg
Bolt M8x2584,000pcs
Adjust quantity — material requirements recalculate automatically

Set Schedule Date

Enter the Requested Start Date. The system will calculate the Requested End Date based on the total operation durations and working hours (8 AM – 4 PM, Mon–Fri).

Manufacturing Orders › MO-2026-0089
AD
Schedule
Requested Start Date
📅 2026-04-10 08:00
Requested End Date (auto)
📅 2026-04-18 16:00
Working Hours
08:00 – 16:00 (480 min/day)
Working Days
Monday – Friday
Set start date — end date calculates from total operation duration

Set Priority

Choose a priority level: Critical, High, Normal, or Low. Priority affects scheduling order — higher priority orders are scheduled first.

Manufacturing Orders › MO-2026-0089
AD
Priority
Priority Level
Critical
Available Options:
CriticalHighNormalLow
Priority affects scheduling order — Critical orders are scheduled first

Confirm the Order

Click "Confirm" to lock in the order. The system will automatically schedule all Job Orders across the assigned Work Centers.

Manufacturing Orders › MO-2026-0089
AD
MO-2026-0089 In Progress
✏️ Edit✅ Mark Done
DraftConfirmedIn ProgressPartialDoneClosed
General Information
Product
Steel Frame Assembly A1
Bill of Materials
BOM-0042 v2
Quantity
500 pcs
Priority
Critical
After confirmation — status pipeline shows progress, Job Orders are auto-scheduled
💡Only Managers, Production Planners, and Super Users can change priority on a confirmed Manufacturing Order. Priority cannot be changed on completed or cancelled orders.

ManufOrder Technical Reference

Model: manuforder

FieldTypeDetails
nameCharField(255)Auto-sequence via manuf.order
statusCharFielddraft | confirm | in_progress | partial | done | close | cancel
priorityCharField(20)critical | high | normal (default) | low. Tracking enabled.
scheduling_statusCharField(20)pending_schedule | scheduled
delay_flagCharField(20)Computed: earlier | on_schedule | delayed
bom_idFK → bomRESTRICT on delete
planned_quantityDecimalDrives material scaling
date_requested_start/endDateTimeend computed via add_working_minutes
date_scheduled_start/endDateTimeComputed from MJO min/max
started_at / completed_atDateTimeComputed from MJO actual times
expected_durationFloatSum of operation durations

Key Methods

MethodDescription
action_confirm()Sets status=confirm, scheduling_status=pending_schedule, calls _run_schedule()
_run_schedule()Decorated with @use_task — runs async via Celery, falls back to sync. Calls ManufWcSchedule.compute_schedule()
action_cancel()Cancels all MJOs, calls handle_mo_cancel() to cascade reschedule
write()Priority changes on confirmed MOs require role check via _check_priority_access(), triggers handle_priority_change()
_onchange_bom_id()Auto-populates mo_materials and job orders
_onchange_planned_quantity()Recalculates materials and job orders with qty scaling

Priority Access Control

# Roles allowed to change priority on confirmed MOs:
- core_manuf.manuf_group_super_user
- core_manuf.manuf_group_manager
- core_manuf.manuf_group_production_planner
- base.group_system

Material Scaling Logic

# _prepare_material_values()
to_consume_quantity = material.quantity × planned_quantity

# _prepare_workorder_values()
scaled_duration = compute_duration(operation, planned_qty, default_qty)
# where default_qty = sum(bom.output_ids.quantity)

What is a Job Order?

A Job Order (also called Work Order) is a single operation step in the manufacturing process. When you confirm a Manufacturing Order, the system automatically creates one Job Order for each operation defined in the Bill of Materials. Each Job Order is assigned to a specific Work Center.

Planned
Ready
In Progress
Paused
Done

Executing Job Orders

Find Your Job Orders

Go to Manufacturing > Job Orders. You can filter by Work Center, status, or Manufacturing Order to find the jobs assigned to you.

Manufacturing > Job Orders
Manufacturing › Job Orders
AD
AllReadyIn Progress
JO NumberMOOperationWork CenterQtyStatus
JO-2026-0201MO-2026-0089Frame WeldingWC-005 Welding Station A500In Progress
JO-2026-0202MO-2026-0089AssemblyWC-003 Assembly Line A500Waiting Material
JO-2026-0203MO-2026-0087CNC MachiningWC-001 CNC Milling #180Ready
JO-2026-0200MO-2026-0089CuttingWC-002 Laser Cutting500Done
Job Order list — filter by Work Center, status, or MO reference

Start the Job Order

Open the Job Order and click "Start". The status changes to "In Progress" and the system begins tracking the actual start time.

Job Orders › JO-2026-0201
AD
JO-2026-0201 Ready
▶ Start
PlannedReadyIn ProgressDone
Job Order Details
Manufacturing Order
MO-2026-0089 — Steel Frame Assembly A1
Work Center
WC-005 — Welding Station A
Operation
Frame Welding — Step 2 of 4
Quantity
500 pcs
Click "Start" to begin — status changes to In Progress and time tracking begins

Pause if Needed

If you need to stop work temporarily, click "Pause". You can resume later by clicking "Start" again. Pause time is tracked separately.

Job Orders › JO-2026-0201
AD
JO-2026-0201 In Progress
⏸ Pause✅ Done
Time Tracking
TypeStartEndDuration
Work08:1512:003h 45m
Pause12:0013:001h 00m
Work13:00Running...
Work: 3h 45m+Pause: 1h 00m
Pause to stop temporarily — time tracking separates work and pause durations

Complete the Job Order

When the operation is finished, click "Done". A Production Record form will open automatically for you to enter the produced quantities, quality results, and any remarks.

Job Orders › JO-2026-0201 › Record
AD
New Production Record Draft
Record Details (auto-filled)
MO
MO-2026-0089
Job Order
JO-2026-0201
Operation
Frame Welding
Planned Qty
500 pcs
MaterialBy ProductsQuality CheckLabor
MaterialPlannedConsumedUoM
Steel Rod 10mm2,5002,500pcs
Welding Wire 1.2mm5048kg
Production Record opens automatically — fill in consumed quantities and quality data
💡

Delay Indicator

Each Job Order shows a delay flag: "Earlier" (ahead of schedule), "On Schedule", or "Delayed". This helps you prioritize which jobs need immediate attention.

ManufJobOrder Technical Reference

Model: manufjoborder

Uses active_name = "active" for soft-delete support (voided by split).

FieldTypeDetails
nameCharField (computed)"{MO.name}/{operation.name}"
statusCharFieldplanned | waiting_material | waiting_mjo | ready | in_progress | paused | done | cancelled | voided
activeBooleanFalse when voided by split
sequenceIntegerOperation order within MO
manuf_order_idFK → manuforderParent MO
workcenter_idFK → workcenterAssigned WC
operationFK → operationBoM operation reference
produce_quantityDecimalTarget quantity
duration_plannedIntegerScaled: setup + estimated × qty_factor
start_date / end_dateDateTime (computed)Gantt view aliases for scheduled dates
split_ref_idFK → manufsplitjoborderSet on child JOs from split
parent_mjo_idFK → selfBack-pointer to voided source JO

Action Methods

action_start()   → status = 'in_progress' (from planned/ready/paused)
action_pause()   → status = 'paused' (from in_progress)
action_done()    → creates ManufRecord, status = 'done', opens record form

Production Record Creation

_create_production_record() creates a ManufRecord with draft status. _is_last_job_order() checks if this is the last active JO in the MO (no other non-done/cancelled/voided active JOs).

What is a Production Record?

When you complete a Job Order (click "Done"), the system automatically creates a Production Record. This is where you enter the actual quantities produced, consumed materials, quality check results, and any notes about the production run.

Review Auto-Filled Information

The record will show the MO code, Job Order, operation, work center, and planned quantity. Verify these are correct.

Production Records › REC-2026-0045
AD
REC-2026-0045 Draft
Record Information (auto-filled)
Manufacturing Order
MO-2026-0089
Job Order
JO-2026-0201
Operation
Frame Welding
Work Center
WC-005 — Welding Station A
Planned Quantity
500 pcs
Record Date
2026-04-13
Auto-filled header — verify MO, Job Order, operation, and work center

Enter Production Data

Fill in the Material tab (consumed quantities), By Products tab (if any), Quality Check tab, and Labor tab. Add any remarks in the notes section.

Production Records › REC-2026-0045
AD
MaterialBy ProductsQuality CheckLaborNotes
MaterialPlannedConsumedVarianceUoM
Steel Rod 10mm2,5002,5000pcs
Welding Wire 1.2mm5048-2kg
Fill in consumed quantities — variance is calculated automatically

Confirm the Record

Click "Confirm" to finalize the production record. This action cannot be undone — the record becomes permanent.

Production Records › REC-2026-0045
AD
REC-2026-0045 Confirmed
✅ Confirm
DraftConfirmed
⚠️ This action cannot be undone — the record becomes permanent after confirmation.
Confirm to finalize — this action is irreversible

ManufRecord Technical Reference

Model: manufrecord

FieldTypeDetails
nameCharField(255)Auto-sequence: manuf.record
mjo_idFK → manufjoborderCASCADE
mo_idFK → manuforderCASCADE
workcenter_idFK → workcenterRESTRICT
statusCharFielddraft | confirm
related_mjo_is_last_manuf_job_orderBooleanTrue if this is the last active JO
material_ids, by_product_ids, quality_check_ids, labor_idsTextFieldTemporary JSON/text fields for tabs
remarksTextFieldFree-text notes

action_confirm() sets status to 'confirm' and returns baseactwindowclose to close the dialog.

How Scheduling Works

When you confirm a Manufacturing Order, the system automatically schedules each Job Order on its assigned Work Center. The scheduler respects working hours (8 AM to 4 PM, Monday to Friday) and ensures no two jobs overlap on the same Work Center.

  • Sequential Mode: Operations run one after another — the next operation starts only after the previous one finishes.
  • Parallel Mode: All operations can start at the same time, each on their assigned Work Center.
  • Priority: Higher priority orders (Critical > High > Normal > Low) are scheduled first.
  • Duration Calculation: Setup Time + (Operation Duration × Quantity Factor)
📅Working calendar: Monday to Friday, 8:00 AM – 4:00 PM (480 minutes per day). Weekends and hours outside this range are skipped.

Understanding Delay Flags

FlagMeaningAction Needed
● EarlierScheduled start is before the requested start dateNo action needed — production is ahead of schedule
● On ScheduleScheduled start matches the requested start dateOn track — proceed as planned
● DelayedScheduled start is after the requested start dateConsider increasing priority or splitting the job order

Scheduling Engine Reference

Models

manufwcschedule — one header per WC per date (UNIQUE constraint on workcenter_id + schedule_date).

manufwcscheduleline — one line per MJO (UNIQUE on mjo_id).

Duration Computation

def compute_duration(operation, planned_qty, default_qty, workcenter=None):
    wc = workcenter or operation.work_center
    setup_time = wc.setup_time or 0
    scaling_factor = planned_qty / default_qty
    op_duration = operation.duration * scaling_factor
    return setup_time + op_duration

Working Calendar

SHIFT_START = time(8, 0)
SHIFT_END = time(16, 0)
WORKING_MINUTES_PER_DAY = 480

# add_working_minutes(): spans across days, skips weekends
# snap_to_working_start(): snaps to next valid work hour
# _is_working_day(): Mon-Fri only

compute_schedule(mo) Flow

  1. Get all MJOs sorted by sequence
  2. For each MJO: compute scaled duration
  3. Determine anchor: sequential mode uses prev_finish; parallel mode uses MO requested start
  4. Check WC last finish — if WC is busy, anchor moves forward
  5. Snap to working start, compute finish via add_working_minutes
  6. Create/get schedule header for the date, create schedule line
  7. Sync dates back to MJO

Cascade Operations

TriggerMethodEffect
MO Cancelhandle_mo_cancel()Cancel all MJOs + lines, recalculate affected WCs
Priority Changehandle_priority_change()Re-sort all WC lines by priority + created_at, recalculate from pos 1
Split MJOschedule_single_mjo()Schedule individual child MJO independently
Void MJOhandle_mjo_void()Cancel schedule line, cascade recalculate

When to Split a Job Order

You can split a Job Order when you want to distribute work across multiple Work Centers, or when a single Work Center can't handle the full quantity in time. For example, if you need to produce 1000 units and have 2 machines available, you can split the job into 500 + 500.

Only Job Orders with status Planned, Ready, or Paused can be split. If a job is In Progress, you must pause it first. A job that was created from a previous split cannot be split again.

How to Split a Job Order

Open the Split Wizard

On the Manufacturing Order, click "Split Job Order". The wizard will show all eligible Job Orders.

Manufacturing Orders › MO-2026-0089 › Split
AD
Split Job Order Wizard
Eligible Job Orders
SelectJOOperationWork CenterQtyStatus
JO-2026-0201Frame WeldingWC-005500In Progress
JO-2026-0202AssemblyWC-003500Planned
Split Wizard shows all eligible Job Orders for the MO

Select the Job Order

Choose which Job Order to split. The wizard will display the original quantity and the splittable quantity.

Split Wizard › Select JO
AD
Selected Job Order
Job Order
JO-2026-0201 — Frame Welding
Work Center
WC-005 — Welding Station A
Original Quantity
500 pcs
Splittable Quantity
500 pcs
Original and splittable quantity shown for the selected JO

Define Split Lines

Add at least 2 split lines. For each line, set the quantity and select a Work Center. The system will recommend the best Work Centers based on availability.

Split Wizard › Define Lines
AD
Split Lines (minimum 2)
#QuantityWork CenterRecommended
1300 pcsWC-005 — Welding Station ABest Avail.
2200 pcsWC-006 — Welding Station BAvailable
+ Add LineTotal: 500 / 500 pcs ✓ Balanced
Add split lines — total must equal the splittable quantity exactly

Review & Confirm

Verify that the total of all split quantities equals the splittable quantity exactly. Click "Confirm" to execute the split. The original Job Order will be voided and new ones created.

Split Wizard › Confirm
AD
Split Summary
ActionJob OrderQtyWork Center
VoidJO-2026-0201500WC-005
NewJO-2026-0210300WC-005
NewJO-2026-0211200WC-006
✅ Confirm Split
Original JO is voided, new JOs created with redistributed materials
💡

Work Center Recommendations

The system scores Work Centers by availability. A Work Center with no queue and immediate availability will be ranked "Best", while busy ones are ranked lower. Already-selected Work Centers are deprioritized to encourage load distribution.

Split Job Order Technical Reference

Business Rules

RuleCheck
BR-001Eligibility: status in (planned, ready, paused). In Progress must pause first. No recursive split (split_ref_id must be null).
BR-002Sum of split quantities must equal splittable_qty exactly (tolerance: 0.001)
BR-004Each line min qty: 1. Minimum 2 lines per split.
BR-008WC scoring: score = nextFree_minutes + (queue_length × 10). Already selected WCs get +999 penalty.

Execution Flow (action_confirm)

  1. Validate via _check_split()
  2. Create audit document (ManufSplitJobOrder)
  3. Void source MJO: set active=False, status=voided, voided_by_split_id
  4. Cancel source schedule line via handle_mjo_void()
  5. Create child MJOs from split lines with split_ref_id and parent_mjo_id
  6. Schedule each child via schedule_single_mjo()
  7. Redistribute MO materials proportionally via _redistribute_materials()
  8. Confirm the audit doc (becomes read-only)

Material Redistribution

# _redistribute_materials():
# For each MO material linked to the voided MJO:
#   total_split_qty = sum(child.produce_quantity)
#   for each child MJO:
#     ratio = child.produce_quantity / total_split_qty
#     new_mo_material.to_consume_quantity = original × ratio

Models

manufsplitjoborder — audit document, read-only after confirmation (write raises ValidationError on confirmed state).

manufsplitjoline — split lines with planned_qty, workcenter_id, assigned_mode (auto/manual), duration_planned, resulting_mjo_id.

Assigning Operators

Operators are employees marked as "Manufacturing Labor" in the HR system. You can assign one or more operators to each Job Order with Primary or Secondary roles. The system tracks their availability — an operator currently working on an active job will show as "Busy".

Open a Job Order

Navigate to the Job Order you want to assign operators to.

Job Orders › JO-2026-0201
AD
JO-2026-0201 In Progress
MO
MO-2026-0089
Operation
Frame Welding
Work Center
WC-005 — Welding Station A
Quantity
500 pcs
DetailsOperatorsTime Tracking
Open the Job Order and navigate to the Operators tab

Add Operator Assignments

In the Operators tab, click "Add" and select an employee. Only employees marked as "Manufacturing Labor" will appear. Set their role (Primary or Secondary).

Job Orders › JO-2026-0201 › Operators
AD
DetailsOperatorsTime Tracking
EmployeeRoleStatus
EMP-0034 — Ahmad FauziPrimaryConfirmed
EMP-0041 — Budi SantosoSecondaryConfirmed
+ Add Operator
Add operators — only Manufacturing Labor employees are selectable

Check for Conflicts

If an operator is already assigned to another active job, a conflict will be flagged. A manager can acknowledge the conflict to proceed.

📷Screenshot: Conflict Warning

Time Tracking

The system automatically logs work time for each operator through the Labor Time Log. It records actual start and end times, pause durations, and calculates total actual duration. Time logs can be auto-generated from job order actions or entered manually.

Operator Assignment Technical Reference

Model: manufmjooperator

FieldTypeDetails
mjo_idFK → manufjoborderCASCADE
labor_idFK → hremployeeDomain: is_manufacturing_labor=True
roleCharField(20)primary | secondary
statusCharField(20)assigned | confirmed | replaced | voided
has_conflictBooleanSet when operator has overlapping assignment
conflict_acknowledged_by/atFK/DateTimeManager who acknowledged
replaced_by_idFK → selfFor replacement chains

HrEmployee Extension

class HrEmployee(models.Model):
    class Meta:
        inherit = "hremployee"

    is_manufacturing_labor = models.BooleanField(default=False)
    availability_status = computed:
        "Busy" if any active assignment on non-done MJO
        "Available" otherwise

Labor Time Log: manuflabortimelog

Per-operator time tracking with pause sub-lines (manuflabortimelogpause). Source field: auto (system-generated) or manual.

Time Tracking: manuftimetracking

Per-MJO time entries with type (work/pause), start/end times, duration, and optional reason for pauses.

Security Roles

👑

Super User

Full access to all manufacturing features. Can create, edit, and delete everything.

💼

Manager

Full access to most features. Cannot delete production records or time logs.

📋

Production Planner

Can read, create, and edit. Cannot delete any records.

🔧

Operator

Read-only on most features. Can create and edit Production Records.

Permission Matrix

ModelSuper UserManagerPlannerOperator
Bill of MaterialsCRUDCRUDCRUR
BoM OutputCRUDCRUDCRUR
OperationCRUDCRUDCRUR
MaterialCRUDCRUDCRUR
ByProductCRUDCRUDCRUR
Work CenterCRUDCRUDCRUR
WC Service CostCRUDCRUDCRUR
WC Labor CostCRUDCRUDCRUR
Manufacturing OrderCRUDCRUDCRUR
Job OrderCRUDCRUDCRUR
MO MaterialCRUDCRUDCRUR
Production RecordCRUDCRUCRUCRU
WC ScheduleCRUDCRUDCRUR
Time TrackingCRUDCRUDCRUR
Operator AssignmentRURURUR
Labor TimelogRURURUR
Split Job OrderCRUDCRUDCRUR

C = Create, R = Read, U = Update, D = Delete

Common Issues

Cannot delete a Bill of Materials

The BoM is referenced by one or more Manufacturing Orders. You must delete or cancel all related Manufacturing Orders first before deleting the BoM.

Cannot delete a Work Center

The Work Center is used in one or more BoM operations. Remove it from all BoMs before deleting.

Cannot change priority on a Manufacturing Order

Priority changes on confirmed/in-progress MOs require Manager, Production Planner, or Super User role. Priority cannot be changed on completed or cancelled orders.

Cannot split a Job Order

Check that: (1) The Job Order status is Planned, Ready, or Paused. If In Progress, pause it first. (2) The Job Order is not already a result of a previous split. (3) You have at least 2 split lines with valid quantities that sum to the splittable amount.

Scheduling shows "Delayed" status

💡This means the Work Center is busy with higher-priority or earlier jobs. Options: (1) Increase the MO priority to Critical or High. (2) Split the Job Order to distribute across multiple Work Centers. (3) Adjust the requested start date.

Operator shows as "Busy"

💡The operator has an active assignment (Assigned or Confirmed status) on a Job Order that is not yet Done or Cancelled. Complete or cancel the other Job Order first, or assign a different operator.

Technical Troubleshooting

Celery Task Failures

The scheduling task (_run_schedule) is decorated with @use_task(fallback_to_sync=True). If Celery is unavailable, it falls back to synchronous execution. Check Celery worker logs if scheduling seems delayed.

Schedule Integrity

If schedule data becomes inconsistent, you can trigger a full recalculation for a Work Center:

schedule_model = env['manufwcschedule']
schedule_model.recalculate_sequences(wc_id, from_position=1)

Unique Constraint Violations

  • workcenter.code — unique across all Work Centers
  • manufwcschedule (workcenter_id, schedule_date) — one schedule per WC per date
  • manufwcscheduleline.mjo_id — one schedule line per MJO
  • material (operation, product) — unique product per operation