Odoo 19.0 Community · Persistent

stock.location: fields, relations and API

The stock.location model ("Inventory Locations") is a persistent model declared by the Inventory module, then extended by 3 other modules. It exposes 36 fields, 30 of them declared directly on the model; 69 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.location
Label
Inventory Locations
Type
Persistent (models.Model)
SQL table
stock_location
Origin module
Inventory (stock)
Extended by
stock_account, mrp_subcontracting, stock_maintenance
Default order (_order)
complete_name, id

Model fields

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

36 of 36 fields shown

Technical nameLabelTypeDetails
activeActive

By unchecking the active field, you may hide a location without deleting it.

boolean
barcodeBarcodechar
child_idsContainsone2many

inverse: location_id

child_internal_location_idsInternal locations among descendants

This location (if it's internal) and all its descendants filtered by type=Internal.

many2many
computed
company_idCompany

Let this field empty if this location is shared between companies

many2one
complete_nameFull Location Namechar
computed, stored
cyclic_inventory_frequencyInventory Frequency

When different than 0, inventory count date for products stored at this location will be automatically set at the defined frequency.

integer
equipment_countEquipment Countinteger
computed

added by Stock - Maintenance (stock_maintenance)

forecast_weightForecasted Weightfloat
computed
incoming_move_line_idsIncoming Move Lineone2many

inverse: location_dest_id

is_emptyIs Emptyboolean
computed
is_valued_externalIs valued outside the companyboolean
computed

added by WMS Accounting (stock_account)

is_valued_internalIs valued inside the companyboolean
computed

added by WMS Accounting (stock_account)

last_inventory_dateLast Inventory

Date of the last inventory at this location.

date
read-only
location_idParent Location

The parent location that includes this location. Example : The 'Dispatch Zone' is the 'Gate 1' parent location.

many2one
nameLocation Namechar
required
net_weightNet Weightfloat
computed
next_inventory_dateNext Expected

Date for next planned inventory based on cyclic schedule.

date
computed, stored
outgoing_move_line_idsOutgoing Move Lineone2many

inverse: location_id

parent_pathParent Pathchar
putaway_rule_idsPutaway Rulesone2many

inverse: location_in_id

quant_idsQuantone2many

inverse: location_id

removal_strategy_idRemoval Strategy

Defines the default method used for suggesting the exact location (shelf) where to take the products from, which lot etc. for this location. This method can be enforced at the product category level, and a fallback is made on the parent locations if none is set here. FIFO: products/lots that were stocked first will be moved out first. LIFO: products/lots that were stocked last will be moved out first. Closest Location: products/lots closest to the target location will be moved out first. Least Packages: products/lots that were stocked in package with least amount of qty will be moved out first. FEFO: products/lots with the closest removal date will be moved out first (the availability of this method depends on the "Expiration Dates" setting).

many2one
replenish_locationReplenishments

Trigger replenishment suggestions for this location when required

boolean
computed, stored
storage_category_idStorage Categorymany2one
subcontractor_idsSubcontractorone2many

inverse: property_stock_subcontractor

added by MRP Subcontracting (mrp_subcontracting)

usageLocation Type

* Vendor: Virtual location representing the source location for products coming from your vendors * Virtual: Virtual location used to create a hierarchical structure for your warehouse by aggregating its child locations. Can't directly contain products * Internal: Physical locations inside your warehouses, * Customer: Virtual location representing the destination location for products sent to your customers * Inventory Loss: Virtual location serving as the counterpart for inventory operations done to correct stock levels (Physical inventories) * Production: Virtual counterpart location for production operations. I.e. This location consumes components and produces finished products * Transit: Counterpart location that should be used for inter-company or inter-warehouses operations

selection
required

Values: supplier (Vendor), view (Virtual), internal (Internal), customer (Customer), inventory (Inventory Loss), production (Production), transit (Transit)

valuation_account_idStock Valuation Account

Expense account used to re-qualify products removed from stock and sent to this location

many2one

added by WMS Accounting (stock_account)

warehouse_idWarehousemany2one
computed, stored
warehouse_view_idsWarehouse Viewone2many
read-only

inverse: view_location_id

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

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.location/search_read" \
  -H "Authorization: bearer $ODOO_API_KEY" \
  -H "X-Odoo-Database: your-db" \
  -H "Content-Type: application/json" \
  -d '{"domain":[],"fields":["name","usage","company_id","location_id","removal_strategy_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.location/search_read",
    headers=headers,
    json={"domain": [], "fields": ["name","usage","company_id","location_id","removal_strategy_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-location">stock.location (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.