OdooWiki OCA HUB

Sale Order Line Multi Warehouse

sale_order_line_multi_warehouse folder_open OCA/sale-workflow open_in_new
Sales License: AGPL-3

This module allows to select multiple warehouses in sale order lines so the sale order is split into multiple pickings depending on the warehouses selected in the lines.

auto_awesome What this module does

AI-generated from the code · Odoo 17.0

Split a sale order line across several warehouses so the delivery is created as separate pickings per warehouse. A company setting enables the feature, and each line shows how much quantity is assigned to each warehouse.

When the company option "Multi Warehouse in Sale Orders" is enabled (Inventory settings), sale order lines can be distributed over several warehouses. On the sale order form a new Warehouses button opens a screen where you add one row per warehouse with the quantity to ship from it; the line then shows the total "Qty. Assigned to Warehouses".

  • Only warehouses that are the order's warehouse or listed as "Alternative Warehouses" on the warehouse record can be chosen.
  • Only one row per warehouse is allowed on a line, and the assigned quantities must match the ordered quantity; changing the ordered quantity automatically adjusts the distribution.
  • On confirmation, if any distribution row uses a warehouse incompatible with the order's warehouse, validation is blocked with an error.
  • Each warehouse row shows the delivered quantity (after delivery) or the forecasted quantity (before), and the delivery moves are linked to the warehouse row so separate pickings are generated per warehouse.
  • A "Change Warehouse" wizard lets you pick a new warehouse for the order; it lists the distribution rows that are incompatible with the new warehouse and updates them when you confirm, but only while the order is not yet confirmed.

It touches sale.order, sale.order.line, stock.move, stock.rule and stock.warehouse.

Depends on

sale_stock
Models and fields (10)
  • sale.order · extends an existing modelsuitable_warehouse_ids (Suitable Warehouses), allow_sale_multi_warehouse
  • stock.move · extends an existing modelsale_order_line_warehouse_id (Sale Order Line Warehouse)
  • stock.rule · extends an existing model
  • res.company · extends an existing modelallow_sale_multi_warehouse
  • sale.order.line · extends an existing modelsuitable_warehouse_ids (Suitable Warehouses), qty_assigned_to_warehouse (Qty. Assigned to Warehouses), allow_sale_multi_warehouse, sale_order_line_warehouse_ids (SO Line Warehouses)
  • stock.warehouse · extends an existing modelalternative_warehouse_ids (Alternative Warehouses)
  • res.config.settings · extends an existing modelallow_sale_multi_warehouse (Multi Warehouse in Sale Orders)
  • sale.order.line.warehouse · new modelmove_ids (Moves), product_id (Product), qty_forecast (Forecast Qty.), warehouse_id (Warehouse), order_line_id (Sale Order Line), qty_delivered (Qty. Delivered), product_uom_id (UoM), product_uom_qty (Quantity), qty_forecast_uom_id (Forecast Qty. UoM), suitable_warehouse_ids
  • so.multi.warehouse.change.wizard · new modelsale_order_id (Sale Order), new_warehouse_id (New Warehouse), current_warehouse_id (Current Warehouse), has_incompatibilities, so_multi_warehouse_change_line_ids
  • so.multi.warehouse.change.line.wizard · new modelproduct_id (Product), warehouse_id (Warehouse), product_uom_id (Unit Of Measure), product_uom_qty (Quantity), sale_order_line_warehouse_id (Current Warehouse), so_multi_warehouse_change_wizard_id (SO Multi Warehouse Change Wizard)

Text generated by AI (DeepSeek) from reading the Odoo 17.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 17.0

Confirmed on 2026-11-03 in branch 17.0 of OCA/sale-workflow.

terminal Installation and usage

OCA documentation · Odoo 17.0
  • Module sale_procurement_group_by_line should not be used along with this module as it provides the base to split sale order lines depending on different criteria, which might make sale_order_line_multi_warehouse module malfunction.

To activate the sale orders multi-warehouse options you need to:

  • Go to Inventory \> Configuration \> Settings.
  • Activate the "Multi Warehouse in Sale Orders" option, under the "Warehouse" section. This field is only visible for users in group "Inventory / Administrator". When a sale order is created, multi warehouse options in sale order lines will be enabled/disabled depending on the value in this field on creation.

It is necessary to set alternative warehouses to a warehouse so they can be selected in sale order lines when the warehouse is set in the "Warehouse" field in a sale order. To set alternative warehouses you need to:

  • Go to Inventory \> Configuration \> Warehouses and see a warehouse's form view.
  • Select the warehouse's alternative warehouses in the "Altenative Warehouses" field. This field is only visible for users in group "Inventory / Administrator".
  • To split a sale order line into multiple warehouses you need to click on the tree graph icon in a sale order line. A popup will open, where warehouses and quantities can be selected. Only the warehouses set in the "Alternative Warehouses" field in the warehouse set in the sale order can be selected. Sale order line quantity and its warehouse distributions line quantities are synchronized as follows:
  • When quantity is increased in a sale order line:
  • In case there is a warehouse distribution line related to the warehouse set in the sale order, the increased quantity is added to the quantity in this warehouse distribution line.
  • In case there is not a warehouse distribution line related to the warehouse set in the sale order, a new warehouse distribution line related to the warehouse set in the sale order is created containing the increased amount.
  • When quantity is decreased in a sale order line:
  • In case there is a warehouse distribution line related to the warehouse set in the sale order, the decreased quantity is substracted from the quantity amount in this warehouse distribution line. When the amount set in this warehouse distribution line is not enough, the pending amount is randomly substracted from the rest of warehouse distribution lines.
  • In case there is not a warehouse distribution line related to the warehouse set in the sale order, the decreased quantity is randomly subsctracted from the available warehouse distribution lines.
  • When quantity is modified in a warehouse distribution line, the amount in the sale order line is automatically updated so it matches the total amount in the sale warehouse distribution lines.
  • When the multi warehouse options in sale order lines are enabled, changing the general sale order warehouse needs to be done through a wizard, located in the "Other Info" tab, in the "Delivery" section. The button is only visible for users in group "Technical / Manage Multiple Warehouses".
  • A sale order line cannot have multiple warehouse distribution lines related to the same warehouse.
  • Once the sale order is validated, the order will be split into multiple pickings, one for each warehouse selected in the warehouse distribution lines.
  • IMPORTANT: In case this module is uninstalled, the warehouse distribution lines will be lost.
info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.