Skip to content

Odoo manufacturing workflow

two vs three step setup

Odoo manufacturing workflow drives efficient production in your factory. First, it lets you map each operation clearly. Next, it guides you through defining your BoM and routing. Then, it shows you how to run one-, two-, or three-step processes. Finally, it ensures you optimize your factory floor and deliver quality goods on time.

Understanding Odoo manufacturing workflow

What is a production workflow?

First, a production workflow represents the sequence of steps you follow to turn raw materials into finished goods. Moreover, it captures operations, work centers, and sequences. Therefore, you visualize each task, assign resources, and track progress in real time.

Why use a robust manufacturing process?

First, you remove guesswork by enforcing clear steps. Next, you boost throughput by balancing work centers. Then, you control costs by tracking time and materials per operation. Finally, you gain insights via built-in reports in the Manufacturing module.

For more details about Odoo’s Manufacturing features, visit the Odoo Manufacturing Documentation.

Core components of an Odoo manufacturing workflow

Bill of Materials (BoM)

First, the Bill of Materials lists the components you need for each finished product. Moreover, it lets you specify quantities and variants. Therefore, Odoo knows exactly which raw materials to reserve when you launch a manufacturing order.

<record id="bom_sample_product" model="mrp.bom">
  <field name="product_tmpl_id" ref="product_template_sample"/>
  <field name="product_qty">1</field>
  <field name="type">normal</field>
  <field name="bom_line_ids" eval="[
      (0, 0, {'product_id': ref('product_component_a'), 'product_qty': 2}),
      (0, 0, {'product_id': ref('product_component_b'), 'product_qty': 1})
  ]"/>
</record>

Routings and Operations

First, a routing defines the sequence of operations that form your production workflow. Moreover, each operation ties to a work center. Then, you assign cycle times and setup times. Therefore, you model your factory floor and optimize load.

<record id="routing_two_step" model="mrp.routing">
  <field name="name">Two-Step Manufacturing</field>
  <field name="workcenter_ids" eval="[
      (0, 0, {
          'operation_id': ref('mrp_workcenter_operation_cutting'),
          'sequence': 1,
          'time_cycle': 0.5,
          'time_waiting': 0.1
      }),
      (0, 0, {
          'operation_id': ref('mrp_workcenter_operation_assembly'),
          'sequence': 2,
          'time_cycle': 1.0,
          'time_waiting': 0.2
      })
  ]"/>
</record>

Setting up a one-step workflow

First, you create a simple routing with one operation. Next, you link it to your BoM. Then, you run a manufacturing order and confirm it in the UI.

Define a single-step routing

<record id="routing_one_step" model="mrp.routing">
  <field name="name">Single-Step Workflow</field>
  <field name="workcenter_ids" eval="[
      (0, 0, {
          'operation_id': ref('mrp_workcenter_operation_assembly'),
          'sequence': 1,
          'time_cycle': 1.0,
          'time_waiting': 0.1
      })
  ]"/>
</record>

Link your BoM to the routing

<record id="bom_one_step" model="mrp.bom">
  <field name="product_tmpl_id" ref="product_template_sample"/>
  <field name="routing_id" ref="routing_one_step"/>
  <field name="product_qty">1</field>
</record>

Run your manufacturing order

  1. Go to Manufacturing ▶️ Operations ▶️ Manufacturing Orders.
  2. Click Create, select your product, and choose quantity.
  3. Confirm your order.
  4. Click Mark as Done once your work center finishes.
# Example: Create and confirm a production order via code
order = env['mrp.production'].create({
    'product_id': sample_product.id,
    'product_qty': 5,
    'bom_id': env.ref('your_module.bom_one_step').id,
})
order.action_confirm()
order.button_mark_done()

Configuring a two-step process in your production process

First, you break your workflow into two distinct operations. Next, you test the flow in the UI. Then, you validate data on the work orders.

Create a two-step routing

First, define two operations: Cutting and Assembly.

<record id="routing_two_step" model="mrp.routing">
  <field name="name">Two-Step Manufacturing</field>
  <field name="workcenter_ids" eval="[
      (0, 0, {
          'operation_id': ref('mrp_workcenter_operation_cutting'),
          'sequence': 1,
          'time_cycle': 0.5,
          'time_waiting': 0.1
      }),
      (0, 0, {
          'operation_id': ref('mrp_workcenter_operation_assembly'),
          'sequence': 2,
          'time_cycle': 1.0,
          'time_waiting': 0.2
      })
  ]"/>
</record>

Link two-step routing to BoM

First, update your BoM record to use the new routing.

<record id="bom_two_step" model="mrp.bom">
  <field name="product_tmpl_id" ref="product_template_sample"/>
  <field name="routing_id" ref="routing_two_step"/>
  <field name="product_qty">1</field>
</record>

Test your two-step process

  1. Open Manufacturing Orders.
  2. Create a new order using the two-step BoM.
  3. Confirm the order.
  4. Click Work Orders.
  5. Complete Cutting first, then Assembly.
  6. Finally, click Done on the Manufacturing Order.
# Example: Trigger two-step orders via shell
prod = env['mrp.production'].create({
    'product_id': sample_product.id,
    'product_qty': 3,
    'bom_id': env.ref('your_module.bom_two_step').id,
})
prod.action_confirm()
for wo in prod.workorder_ids:
    wo.button_finish()

Implementing a three-step workflow in Odoo manufacturing workflow

First, you extend to three distinct operations. Next, you ensure each step logs time and material consumption. Then, you analyze the cycle times to optimize further.

Define work centers and operations

First, create three operations: Cutting, Welding, Painting.

<record id="mrp_operation_cutting" model="mrp.routing.workcenter">
  <field name="name">Cutting</field>
  <field name="sequence">1</field>
  <field name="workcenter_id" ref="mrp_workcenter_production"/>
  <field name="time_cycle">0.5</field>
  <field name="time_waiting">0.1</field>
</record>

<record id="mrp_operation_welding" model="mrp.routing.workcenter">
  <field name="name">Welding</field>
  <field name="sequence">2</field>
  <field name="workcenter_id" ref="mrp_workcenter_welding"/>
  <field name="time_cycle">1.0</field>
  <field name="time_waiting">0.2</field>
</record>

<record id="mrp_operation_painting" model="mrp.routing.workcenter">
  <field name="name">Painting</field>
  <field name="sequence">3</field>
  <field name="workcenter_id" ref="mrp_workcenter_painting"/>
  <field name="time_cycle">0.8</field>
  <field name="time_waiting">0.15</field>
</record>

Create a three-step routing

<record id="routing_three_step" model="mrp.routing">
  <field name="name">Three-Step Manufacturing</field>
  <field name="workcenter_ids" eval="[
      (4, ref('mrp_operation_cutting')),
      (4, ref('mrp_operation_welding')),
      (4, ref('mrp_operation_painting'))
  ]"/>
</record>

Update the BoM to include routing

<record id="bom_three_step" model="mrp.bom">
  <field name="product_tmpl_id" ref="product_template_sample"/>
  <field name="routing_id" ref="routing_three_step"/>
  <field name="product_qty">1</field>
</record>

Execute the three-step process

  1. Create a Manufacturing Order using bom_three_step.
  2. Confirm the order.
  3. Complete each Work Order in sequence: Cutting → Welding → Painting.
  4. Click Mark Done on the main order.
# Example: Automate three-step workflow
prod3 = env['mrp.production'].create({
    'product_id': sample_product.id,
    'product_qty': 2,
    'bom_id': env.ref('your_module.bom_three_step').id,
})
prod3.action_confirm()
for wo in prod3.workorder_ids.sorted(key=lambda r: r.sequence):
    wo.button_finish()

Automating your manufacturing workflow with Python

First, you can script repetitive tasks via Odoo’s XML-RPC or shell. Next, you integrate with IoT devices. Then, you generate reports automatically.

Create manufacturing orders via code

from odoo import models, api, SUPERUSER_ID

def create_production(env, product_ref, bom_ref, qty):
    env_uid = SUPERUSER_ID
    product = env.ref(product_ref)
    bom = env.ref(bom_ref)
    order = env['mrp.production'].with_user(env_uid).create({
        'product_id': product.id,
        'product_qty': qty,
        'bom_id': bom.id,
    })
    order.action_confirm()
    return order

Refresh work order status programmatically

def finish_all_operations(order):
    for wo in order.workorder_ids:
        wo.button_finish()
    order.button_mark_done()

Best practices for Odoo manufacturing workflow

Keep your BoM lean

First, list only essential components. Moreover, update BoMs when you revise your design. Then, archive old versions to prevent confusion.

Balance work center loads

First, assign realistic cycle times. Next, monitor actual vs planned time. Then, adjust routes to avoid bottlenecks.

Use materialized reports

First, build SQL views or materialized views for heavy reports. Moreover, refresh daily via a cron job. Finally, link them to Odoo dashboards for quick insights.

<record id="view_mrp_report" model="ir.ui.view">
  <field name="name">mrp.report.tree</field>
  <field name="model">mrp.production.report</field>
  <field name="arch" type="xml">
    <tree>
      <field name="date"/>
      <field name="product_id"/>
      <field name="quantity"/>
      <field name="duration"/>
    </tree>
  </field>
</record>

Conclusion

First, you mastered how to set up one-, two-, and three-step production workflows in Odoo. Next, you saw sample XML and Python code that you can adapt. Then, you learned best practices to optimize your factory operations. Finally, you can implement Odoo manufacturing workflow that scales with your business and drives consistent quality output.


Author: IB Teguh – Odoo Developer


Discover more from teguhteja.id

Subscribe to get the latest posts sent to your email.

Leave a Reply

WP Twitter Auto Publish Powered By : XYZScripts.com