OdooWiki OCA HUB

Sale Sourced By Line Product Rule

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

This module allows to force the source warehouse on sale order line from the product.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Lets you define, per product, per attribute value or per template, which warehouse should ship a sale order line, and automatically applies that warehouse to the line and its delivery.

This module adds warehouse rules to products so that the right warehouse is used for each sale order line.

On a product template form you get a new "Warehouse Rules" tab where you list rules. Each rule can target the whole template, a specific variant (product), or one or more attribute values, and gives a warehouse and a company. Rules are checked for duplicates: you cannot have two rules with the same product, the same attributes, or two template-level rules for the same company.

On a product variant form, a "Shipping Warehouse" field shows the warehouse that results from the matching rule for the current company (hidden for services and digital products).

On a sale order, each line gets a Warehouse column. It is filled automatically from the product rule, otherwise from the order's warehouse, and it is editable while the order is in draft. A setting in Sales configuration lets you hide or show that column. The chosen warehouse is passed on to the delivery/stock operation when the order is confirmed.

Sale orders also show warning banners: a red one when all lines point to a single warehouse different from the order's warehouse (the order warehouse is switched to it on confirmation), and a blue one when lines come from several warehouses.

Salespeople can create and edit rules; other internal users can only read them.

Models and fields (7)
  • sale.order · extends an existing modelwarehouse_rule_info, warehouse_rule_need_change, show_sale_line_warehouse_column
  • res.company · extends an existing modelshow_sale_line_warehouse_column (Show Warehouse Column on Sale Order Lines)
  • product.product · extends an existing modelvariant_warehouse_id (Default Warehouse)
  • sale.order.line · extends an existing modelwarehouse_id
  • product.template · extends an existing modelwarehouse_rule_ids (Product Warehouse Rules)
  • res.config.settings · extends an existing modelshow_sale_line_warehouse_column (Show Warehouse Column on Sale Order Lines)
  • sale.line.product.rule · new modelapplied_on (Applied on), company_id (Company), warehouse_id (Warehouse)

Text generated by AI (DeepSeek) from reading the Odoo 16.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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

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

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

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.