OdooWiki OCA HUB

Sale Order Warehouse Location

sale_order_warehouse_location folder_open OCA/sale-workflow open_in_new
Stock License: AGPL-3

This module allows to set countries and states in warehouses, so they can automatically be set in a sale order when its shipping address matches the countries and states selected in a given warehouse.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Lets you tag each warehouse with the countries and states it serves, so Odoo automatically picks the right warehouse on a sales order when the delivery address matches.

This module links warehouses to the geographic areas they deliver to, and uses that link to fill in the warehouse on sales orders automatically.

On each warehouse form (Inventory configuration), a new "Sale Order Warehouse" section lets you select one or more Sale Order Countries and, optionally, Sale Order States. States are filtered to those belonging to the selected countries, and if you remove a country its states are removed automatically.

On a sales order, when the delivery address (shipping contact) is set and the order is still in Quotation or Quotation Sent status, Odoo looks for a warehouse whose countries and states match the customer's country and state, and sets that warehouse on the order. If no warehouse matches, the existing warehouse is left unchanged. Only warehouses of the order's company (or shared warehouses with no company) are considered.

  • Adds country and state fields to stock.warehouse.
  • Extends the warehouse form view with a new group for these fields.
  • Extends sale.order to recompute the warehouse when the shipping address changes.
  • Matching rule: the customer's country must be among the warehouse countries; if states are defined, the customer's state must also match.

Depends on

sale_stock
Models and fields (2)
  • sale.order · extends an existing model
  • stock.warehouse · extends an existing modelsale_state_ids (Sale Order States), sale_country_ids (Sale Order Countries)

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

OCA documentation · Odoo 16.0

In configure countries and states in warehouses you need to:

  • Go to Inventory > Configuration > Warehouses and access a warehouse.
  • Select the countries and/or states where the warehouse has to be automatically set in a sale order based on its shipping address. Only states that belong to the selected countries can be chosen.

When the shipping address field in a sale order is modified, it is checked whether a warehouse is applied in the region according to the shipping address' country and state. In order to determine if the warehouse matches the address, the country in the shipping address must be part of the "Sale Order Countries" field in a warehouse. Moreover, if the warehouse has some states in its "Sale Order States" field, the state in the shipping address must be part of this field too. If no warehouses are found, the default process for warehouse selection is followed.

Keep in mind that the Warehouse field in sale orders is only visible if the user has multi-warehouse rights.

No verified information in OCA: Installation.

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.