Odoo 19.0 Community · Persistent

stock.warehouse: fields, relations and API

The stock.warehouse model ("Warehouse") is a persistent model declared by the Inventory module, then extended by 9 other modules. It exposes 59 fields, 53 of them declared directly on the model; 28 fields from other models point to it. Below you will find every field with its technical name, type, label and relations, followed by an Odoo 19 JSON-2 API call.

Model identity

Technical name
stock.warehouse
Label
Warehouse
Type
Persistent (models.Model)
SQL table
stock_warehouse
Origin module
Inventory (stock)
Extended by
stock_picking_batch, point_of_sale, mrp, purchase_stock, repair, mrp_subcontracting, mrp_subcontracting_dropshipping, stock_fleet, website_sale_collect
Default order (_order)
sequence,id

Model fields

53 own fields, 0 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.

59 of 59 fields shown

Technical nameLabelTypeDetails
activeActiveboolean
buy_pull_idBuy rulemany2one

added by Purchase Stock (purchase_stock)

buy_to_resupplyBuy to Resupply

When products are bought, they can be delivered to this warehouse

boolean
computed

added by Purchase Stock (purchase_stock)

codeShort Name

Short name used to identify your warehouse

char
required
company_idCompany

The company is automatically set from your user preferences.

many2one
requiredread-only
delivery_route_idDelivery Routemany2one
delivery_stepsOutgoing Shipments

Default outgoing route to follow

selection
required

Values: ship_only (Deliver (1 step)), pick_ship (Pick then Deliver (2 steps)), pick_pack_ship (Pick, Pack, then Deliver (3 steps))

in_type_idIn Typemany2one
int_type_idInternal Typemany2one
lot_stock_idLocation Stockmany2one
required
manu_type_idManufacturing Operation Typemany2one

added by Manufacturing (mrp)

manufacture_mto_pull_idManufacture MTO Rulemany2one

added by Manufacturing (mrp)

manufacture_pull_idManufacture Rulemany2one

added by Manufacturing (mrp)

manufacture_stepsManufacture

1 Step: Consume components from stock and produce. 2 Steps: Pick components from stock and then produce. 3 Steps: Pick components from stock, produce, and then move final product(s) from production area to stock.

selection
required

Values: mrp_one_step (Manufacture (1 step)), pbm (Pick components then manufacture (2 steps)), pbm_sam (Pick components, manufacture, then store products (3 steps))

added by Manufacturing (mrp)

manufacture_to_resupplyManufacture to Resupply

When products are manufactured, they can be manufactured in this warehouse.

boolean
computed

added by Manufacturing (mrp)

mto_pull_idMTO rulemany2one
nameWarehousechar
required
opening_hoursOpening Hoursmany2one

added by Click & Collect (website_sale_collect)

out_type_idOut Typemany2one
pack_type_idPack Typemany2one
partner_idAddressmany2one
pbm_loc_idPicking before Manufacturing Locationmany2one

added by Manufacturing (mrp)

pbm_mto_pull_idPicking Before Manufacturing MTO Rulemany2one

added by Manufacturing (mrp)

pbm_route_idPicking Before Manufacturing Routemany2one

added by Manufacturing (mrp)

pbm_type_idPicking Before Manufacturing Operation Typemany2one

added by Manufacturing (mrp)

pick_type_idPick Typemany2one
pos_type_idPoint of Sale Operation Typemany2one

added by Point of Sale (point_of_sale)

qc_type_idQuality Control Typemany2one
reception_route_idReceipt Routemany2one
reception_stepsIncoming Shipments

Default incoming route to follow

selection
required

Values: one_step (Receive and Store (1 step)), two_steps (Receive then Store (2 steps)), three_steps (Receive, Quality Control, then Store (3 steps))

repair_mto_pull_idRepair MTO Rulemany2one

added by Repairs (repair)

repair_type_idRepair Operation Typemany2one

added by Repairs (repair)

resupply_route_idsResupply Routes

Routes will be created for these resupply warehouses and you can select them on products and product categories

one2many

inverse: supplied_wh_id

resupply_wh_idsResupply From

Routes will be created automatically to resupply this warehouse from the warehouses ticked

many2many
route_idsRoutes

Defaults routes through the warehouse

many2many
sam_loc_idStock after Manufacturing Locationmany2one

added by Manufacturing (mrp)

sam_rule_idStock After Manufacturing Rulemany2one

added by Manufacturing (mrp)

sam_type_idStock After Manufacturing Operation Typemany2one

added by Manufacturing (mrp)

sequenceSequence

Gives the sequence of this line when displaying the warehouses.

integer
store_type_idStorage Typemany2one
subcontracting_dropshipping_pull_idSubcontracting-Dropshipping MTS Rulemany2one

added by Dropship and Subcontracting Management (mrp_subcontracting_dropshipping)

subcontracting_mto_pull_idSubcontracting MTO Rulemany2one

added by MRP Subcontracting (mrp_subcontracting)

subcontracting_pull_idSubcontracting MTS Rulemany2one

added by MRP Subcontracting (mrp_subcontracting)

subcontracting_resupply_type_idSubcontracting Resupply Operation Typemany2one

added by MRP Subcontracting (mrp_subcontracting)

subcontracting_route_idResupply Subcontractormany2one

added by MRP Subcontracting (mrp_subcontracting)

subcontracting_to_resupplyResupply Subcontractorsboolean

added by MRP Subcontracting (mrp_subcontracting)

subcontracting_type_idSubcontracting Operation Typemany2one

added by MRP Subcontracting (mrp_subcontracting)

view_location_idView Locationmany2one
required
wh_input_stock_loc_idInput Locationmany2one
wh_output_stock_loc_idOutput Locationmany2one
wh_pack_stock_loc_idPacking Locationmany2one
wh_qc_stock_loc_idQuality Control Locationmany2one
xdock_type_idCross Dock Typemany2one
create_dateCreated ondatetime
read-onlyautomatic
create_uidCreated bymany2one
read-onlyautomatic
display_nameDisplay Namechar
read-onlycomputedautomatic
idIDinteger
read-onlyautomatic
write_dateLast Updated ondatetime
read-onlyautomatic
write_uidLast Updated bymany2one
read-onlyautomatic

Relations

Models linked from this model

  • res.company: company_id
  • res.partner: partner_id
  • resource.calendar: opening_hours
  • stock.location: lot_stock_id, pbm_loc_id, sam_loc_id, view_location_id, wh_input_stock_loc_id, wh_output_stock_loc_id, wh_pack_stock_loc_id, wh_qc_stock_loc_id
  • stock.picking.type: in_type_id, int_type_id, manu_type_id, out_type_id, pack_type_id, pbm_type_id, pick_type_id, pos_type_id, qc_type_id, repair_type_id, sam_type_id, store_type_id, subcontracting_resupply_type_id, subcontracting_type_id, xdock_type_id
  • stock.route: delivery_route_id, pbm_route_id, reception_route_id, resupply_route_ids, route_ids, subcontracting_route_id
  • stock.rule: buy_pull_id, manufacture_mto_pull_id, manufacture_pull_id, mto_pull_id, pbm_mto_pull_id, repair_mto_pull_id, sam_rule_id, subcontracting_dropshipping_pull_id, subcontracting_mto_pull_id, subcontracting_pull_id
  • stock.warehouse: resupply_wh_ids

Fields of other models pointing here

Reading this model through the API

Odoo 19 JSON-2 API call reading the first five records with real fields of the model. Replace the instance, database and API key with your own.

curl
curl -X POST "https://your-instance.odoo.com/json/2/stock.warehouse/search_read" \
  -H "Authorization: bearer $ODOO_API_KEY" \
  -H "X-Odoo-Database: your-db" \
  -H "Content-Type: application/json" \
  -d '{"domain":[],"fields":["name","code","company_id","delivery_steps","lot_stock_id"],"limit":5}'
Python (requests)
import requests

BASE_URL = "https://your-instance.odoo.com/json/2"
headers = {"Authorization": f"bearer {API_KEY}", "X-Odoo-Database": "your-db"}

res = requests.post(
    f"{BASE_URL}/stock.warehouse/search_read",
    headers=headers,
    json={"domain": [], "fields": ["name","code","company_id","delivery_steps","lot_stock_id"], "limit": 5},
)
res.raise_for_status()
print(res.json())
  • External API access requires Odoo's Custom plan.
  • XML-RPC and JSON-RPC will be removed in Odoo 22 (fall 2028): use JSON-2.
  • The access rights and record rules of the key's user apply.

Cite this tool

Writing a tutorial, internal documentation or a forum answer? Copy this link to send your readers to the up-to-date reference.

<a href="https://aidoo.ai/en/outils/explorateur-modeles-odoo/stock-warehouse">stock.warehouse (Odoo 19.0)</a>

Sources

Data verified on September 23, 2026 · Odoo 19.0 Community

Have an Odoo project, or want to put your ERP to work with AI? Let's talk

Implementation, custom module development, connecting Claude or ChatGPT to your data: tell us about your context and we will reply within 24 business hours.