Skip to main content
Stock Request Orders provide a structured way to manage multiple product requests as a single unit. This guide covers order management, monitoring, and advanced workflows.

Understanding Stock Request Orders

A Stock Request Order is a container for multiple stock requests that share common attributes:

Unified Settings

All line items share the same warehouse, location, expected date, and shipping policy

Bulk Operations

Confirm, cancel, or draft multiple requests with a single action

Organized Tracking

Monitor the overall progress of related requests in one place

Procurement Grouping

Optionally group all generated moves into a single procurement group

Enabling Stock Request Orders

Before you can use orders, the feature must be enabled:
1

Navigate to Settings

Go to Inventory > Configuration > Settings.
2

Find Stock Request Section

Scroll to the Stock Request section under Orders & Configuration.
3

Enable Orders

Check the box for Enable Orders.
This activates the stock_request.group_stock_request_order security group and makes the Stock Request Orders menu visible.
4

Save Configuration

Click Save at the top of the settings page.

Creating and Configuring Orders

Order Header Configuration

The order header defines settings that apply to all line items:
<!-- Order-level fields from stock_request_order_views.xml -->
<field name="expected_date" readonly="state != 'draft'" />
<field name="picking_policy" readonly="state != 'draft'" />
<field name="warehouse_id" readonly="state != 'draft'" />
<field name="location_id" readonly="state != 'draft'" />
<field name="route_id" readonly="state != 'draft'" />
<field name="procurement_group_id" />
<field name="company_id" readonly="state != 'draft'" />
Order header fields are read-only after the order is confirmed. You must cancel and reset to draft to modify them.

Adding Line Items

Line items can be added in the Items tab:
1

Open Items Tab

In the order form, navigate to the Items tab.
2

Add Product Lines

Click Add a line and fill in:
  • Product: The product to request
  • Quantity: Requested quantity
  • UOM: Unit of measure (defaults to product UOM)
  • Route: Optional route override for this specific item
3

Configure Line-Specific Settings

Each line can override the order’s route if needed, but all other settings (warehouse, location, dates) are inherited from the order header.
Line items are editable inline when the order is in draft state. Changes to order header fields automatically propagate to all line items.

Order State Management

Stock Request Orders have computed states based on their line items:
1

Draft

All line items are in draft state or the order has no line items.Computation Logic:
if not stock_request_ids or all(x == 'draft' for x in states):
    state = 'draft'
2

In Progress

At least one line item is in progress, and some may be draft, done, or cancelled.Computation Logic:
if not all(x in ('done', 'cancel') for x in states):
    state = 'open'
3

Done

All line items are either done or cancelled, with at least one done.Computation Logic:
if all(x in ('done', 'cancel') for x in states):
    state = 'done'
4

Cancelled

All line items are cancelled.Computation Logic:
if all(x == 'cancel' for x in states):
    state = 'cancel'
Order states are computed automatically based on line item states. You cannot manually set an order’s state.

Bulk Order Actions

Confirming Orders

Confirming an order processes all line items:
def action_confirm(self):
    if not self.stock_request_ids:
        raise UserError(
            "There should be at least one request item for confirming the order."
        )
    self.mapped('stock_request_ids').action_confirm()
    return True
1

Validate Line Items

The system checks that at least one line item exists.
2

Confirm All Requests

All line items are confirmed in a single operation, triggering procurement for each.
3

State Transition

The order state automatically transitions to “In Progress” once confirmation is complete.
You cannot confirm an empty order. At least one line item must be present.

Cancelling Orders

Cancelling an order cancels all line items:
def action_cancel(self):
    self.mapped('stock_request_ids').action_cancel()
    return True
Cancelling propagates to all associated stock moves and pickings. If any line items have related purchase orders or manufacturing orders, those may also be affected.

Resetting to Draft

def action_draft(self):
    self.mapped('stock_request_ids').action_draft()
    return True
Resetting to draft allows you to modify order settings and line items again.

Monitoring Order Progress

Smart Buttons

The order form provides smart buttons for quick access:

Transfers

Shows the count of associated stock pickings. Click to view all transfers generated by this order.XML Definition:
<button name="action_view_transfer" 
        icon="fa-truck"
        invisible="picking_count == 0">
    <field name="picking_count" widget="statinfo" />
</button>

Stock Requests

Shows the count of line items. Click to view all individual stock requests in this order.XML Definition:
<button name="action_view_stock_requests"
        icon="fa-chain"
        invisible="state == 'draft'">
    <field name="stock_request_count" widget="statinfo" />
</button>

Viewing Associated Transfers

To view all pickings generated by an order:
1

Click Transfers Button

Click the Transfers smart button on the order form.
2

Review Pickings

If multiple pickings exist, a list view opens filtered to show only this order’s transfers.If only one picking exists, the picking form opens directly.
3

Process Transfers

From the pickings, you can validate transfers, check availability, and manage stock operations.

Viewing Line Item Details

To view individual stock requests:
1

Click Stock Requests Button

Click the Stock Requests smart button on the order form.
2

Review Request Details

The stock request list view opens, filtered to show only this order’s line items.
3

Monitor Individual Progress

Check quantities in progress, quantities done, and quantities cancelled for each line item.

Advanced Order Features

Route Management

Orders can specify a default route that applies to all line items:
@api.depends('stock_request_ids')
def _compute_route_id(self):
    for order in self:
        if order.stock_request_ids:
            first_route = order.stock_request_ids[0].route_id or False
            if any(r.route_id != first_route for r in order.stock_request_ids):
                first_route = False
            order.route_id = first_route
The order’s route field shows a route only if all line items use the same route. If line items have different routes, the order route field is blank.

Setting Order Route

1

Select Route in Order Form

In the order form, select a route in the Route field.
2

Automatic Propagation

The route is automatically written to all line items:
def _inverse_route_id(self):
    for order in self:
        if order.route_id:
            order.stock_request_ids.write({'route_id': order.route_id.id})
Set the route at the order level before adding line items to ensure consistency. Individual line items can still override the route if needed.

Available Routes Computation

The system computes available routes based on warehouse and location:
@api.depends('warehouse_id', 'location_id', 'stock_request_ids')
def _compute_route_ids(self):
    # Find routes for the order's warehouse
    routes = route_obj.search(
        [('warehouse_ids', 'in', self.mapped('warehouse_id').ids)]
    )
    # Filter to routes with rules targeting the order location
    valid_routes = [
        route for route in routes 
        if any(p.location_dest_id.id in parents for p in route.rule_ids)
    ]
Only routes configured for the selected warehouse and with rules matching the destination location are available for selection.

Procurement Groups

Assigning a procurement group to an order groups all generated stock moves:

Unified Picking

All stock moves are grouped into fewer pickings for easier management

Traceability

Track all operations related to a specific project or order
1

Create Procurement Group

Navigate to Inventory > Configuration > Procurement Groups (requires Advanced Location permissions).Create a new group with a descriptive name like “Q1 Production Materials”.
2

Assign to Order

In the order form, select the procurement group in the Procurement Group field.
3

Confirm Order

When confirmed, all line items will use this procurement group.

Multi-Product Workflows

Creating Orders from Product Selection

You can bulk-create orders from the product catalog:
@api.model
def _create_from_product_multiselect(self, products):
    if products._name == 'product.template':
        products = self.env['product.product'].search(
            [('product_tmpl_id', 'in', products.ids)]
        )
    expected = self.default_get(['expected_date'])['expected_date']
    order = self.env['stock.request.order'].create(dict(
        expected_date=expected,
        stock_request_ids=[
            (0, 0, dict(
                product_id=product.id,
                product_uom_id=product.uom_id.id,
                product_uom_qty=1.0,
                expected_date=expected,
            )) for product in products
        ],
    ))
1

Navigate to Products

Go to Inventory > Products > Products.
2

Select Multiple Products

Check the boxes next to products you want to request.
3

Create Order Action

From the Actions menu, select Create Stock Request Order.
4

Customize Generated Order

The system creates an order with one line per product, each with quantity 1.0. Edit quantities and settings as needed.

Splitting Orders

To split a large order into multiple smaller orders:
1

Open Original Order

Navigate to the order you want to split.
2

Duplicate Order

Click Actions > Duplicate to create a copy.
3

Remove Line Items

In each order, remove line items you don’t want, keeping different subsets in each order.
4

Adjust Settings if Needed

Modify expected dates, locations, or other settings for each split order.
5

Confirm Each Order

Confirm each split order independently.

Order Reporting and Analysis

Searching and Filtering

The order search view provides filters:
<filter name="draft" domain="[('state','=','draft')]" />
<filter name="open" domain="[('state','=','open')]" />
<filter name="done" domain="[('state','=','done')]" />
<filter name="cancel" domain="[('state','=','cancel')]" />

<filter name="warehouse" context="{'group_by':'warehouse_id'}" />
<filter name="location" context="{'group_by':'location_id'}" />
Use the Group By > Warehouse filter to see order counts and progress by warehouse, useful for multi-warehouse environments.

Tracking Completion

To monitor order completion rates:
1

Open Orders List

Navigate to Inventory > Operations > Stock Request Orders.
2

Apply Filters

Use filters to show orders in specific states:
  • In Progress: Orders currently being fulfilled
  • Done: Completed orders
3

Group by Location or Warehouse

Group orders to see fulfillment patterns by location.
4

Review Line Item Progress

Open individual orders and review the Items tab to see:
  • Quantity In Progress for each line
  • Quantity Done for each line

Order Validation and Constraints

Company Consistency

@api.constrains('warehouse_id', 'company_id')
def _check_warehouse_company(self):
    if any(request.warehouse_id.company_id != request.company_id 
           for request in self):
        raise ValidationError(
            "The company of the stock request must match with "
            "that of the warehouse."
        )
The warehouse must belong to the same company as the order. Cross-company orders are not supported.

Location Consistency

@api.constrains('location_id', 'company_id')
def _check_location_company(self):
    if any(request.location_id.company_id and 
           request.location_id.company_id != request.company_id 
           for request in self):
        raise ValidationError(
            "The company of the stock request must match with "
            "that of the location."
        )
Locations without a company assignment (company-agnostic locations) can be used in any order.

Integration with Other Modules

Purchase Integration

When the Stock Request Purchase module is installed:
  • Orders can trigger purchase orders when confirmed
  • Smart buttons show related purchase orders
  • Cancelling an order can cascade to cancel draft purchase orders

Manufacturing Integration

When the Stock Request MRP module is installed:
  • Orders can trigger manufacturing orders
  • Smart buttons show related production orders
  • MRP routes become available for selection

Submit Workflow

When the Stock Request Submit module is installed:
  • Orders support a Submitted state for approval workflows
  • Users can submit orders for manager review before confirmation

Best Practices

Use consistent naming for procurement groups: Name groups after projects, departments, or time periods to improve traceability.
  • Create template orders for recurring material needs and duplicate them
  • Set realistic expected dates at the order level to prioritize warehouse work
  • Use the product multi-select feature for quick ad-hoc orders
  • Monitor the Transfers smart button to track fulfillment progress
  • Group related orders by procurement group for better organization
  • Confirm orders only when all line items are finalized to avoid partial processing
  • Use order notes (chatter) to communicate special requirements to warehouse staff

Troubleshooting

Cause: The order has no line items in the Items tab.Solution: Add at least one product line before confirming the order.
Cause: The order is not in draft state.Solution: Click Cancel to cancel all line items, then Set to Draft to make the order editable again.
Cause: Order state is computed from line item states. Changes may not trigger recomputation immediately.Solution: Refresh the page or reopen the order to see the updated state. The computation is based on stored states of line items.
Cause: Line items have different routes assigned.Solution: This is expected behavior. The order route field only shows a value when all line items have the same route. Use the order route field to set a uniform route across all items.

Build docs developers (and LLMs) love