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 name | Label | Type | Details |
|---|---|---|---|
| active | Active By unchecking the active field, you may hide a location without deleting it. | boolean | |
| barcode | Barcode | char | |
| child_ids | Contains | one2many | inverse: |
| child_internal_location_ids | Internal locations among descendants This location (if it's internal) and all its descendants filtered by type=Internal. | many2many | computed |
| company_id | Company Let this field empty if this location is shared between companies | many2one | |
| complete_name | Full Location Name | char | computed, stored |
| cyclic_inventory_frequency | Inventory Frequency When different than 0, inventory count date for products stored at this location will be automatically set at the defined frequency. | integer | |
| equipment_count | Equipment Count | integer | computed added by Stock - Maintenance ( |
| forecast_weight | Forecasted Weight | float | computed |
| incoming_move_line_ids | Incoming Move Line | one2many | inverse: |
| is_empty | Is Empty | boolean | computed |
| is_valued_external | Is valued outside the company | boolean | computed added by WMS Accounting ( |
| is_valued_internal | Is valued inside the company | boolean | computed added by WMS Accounting ( |
| last_inventory_date | Last Inventory Date of the last inventory at this location. | date | read-only |
| location_id | Parent Location The parent location that includes this location. Example : The 'Dispatch Zone' is the 'Gate 1' parent location. | many2one | |
| name | Location Name | char | required |
| net_weight | Net Weight | float | computed |
| next_inventory_date | Next Expected Date for next planned inventory based on cyclic schedule. | date | computed, stored |
| outgoing_move_line_ids | Outgoing Move Line | one2many | inverse: |
| parent_path | Parent Path | char | |
| putaway_rule_ids | Putaway Rules | one2many | inverse: |
| quant_ids | Quant | one2many | inverse: |
| removal_strategy_id | Removal 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_location | Replenishments Trigger replenishment suggestions for this location when required | boolean | computed, stored |
| storage_category_id | Storage Category | many2one | |
| subcontractor_ids | Subcontractor | one2many | inverse: added by MRP Subcontracting ( |
| usage | Location 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: |
| valuation_account_id | Stock Valuation Account Expense account used to re-qualify products removed from stock and sent to this location | many2one | added by WMS Accounting ( |
| warehouse_id | Warehouse | many2one | computed, stored |
| warehouse_view_ids | Warehouse View | one2many | read-only inverse: |
| create_date | Created on | datetime | read-onlyautomatic |
| create_uid | Created by | many2one | read-onlyautomatic |
| display_name | Display Name | char | read-onlycomputedautomatic |
| id | ID | integer | read-onlyautomatic |
| write_date | Last Updated on | datetime | read-onlyautomatic |
| write_uid | Last Updated by | many2one | read-onlyautomatic |
Relations
Models linked from this model
- account.account: valuation_account_id
- product.removal: removal_strategy_id
- res.company: company_id
- res.partner: subcontractor_ids
- stock.location: child_ids, child_internal_location_ids, location_id
- stock.move.line: incoming_move_line_ids, outgoing_move_line_ids
- stock.putaway.rule: putaway_rule_ids
- stock.quant: quant_ids
- stock.storage.category: storage_category_id
- stock.warehouse: warehouse_id, warehouse_view_ids
Fields of other models pointing here
- maintenance.equipment: location_id
- mrp.production: location_dest_id, location_final_id, location_src_id, production_location_id
- mrp.unbuild: location_dest_id, location_id
- product.template: location_id, property_stock_inventory, property_stock_production
- purchase.order.line: location_final_id
- repair.order: location_dest_id, location_id, parts_location_id, product_location_dest_id, product_location_src_id, recycle_location_id
- res.company: internal_transit_location_id, subcontracting_location_id
- res.partner: property_stock_customer, property_stock_subcontractor, property_stock_supplier
- stock.location: child_internal_location_ids, location_id
- stock.lot: location_id
- stock.move: location_dest_id, location_final_id, location_id
- stock.move.line: location_dest_id, location_id, picking_location_dest_id, picking_location_id
- stock.package: location_dest_id, location_id
- stock.package.destination: location_dest_id
- stock.package.history: location_dest_id, location_id
- stock.picking: location_dest_id, location_id
- stock.picking.batch: allowed_dock_ids, dock_id
- stock.picking.type: default_location_dest_id, default_location_src_id, default_product_location_dest_id, default_product_location_src_id, default_recycle_location_dest_id, default_remove_location_dest_id, dock_ids, wave_location_ids
- stock.put.in.pack: location_dest_id
- stock.putaway.rule: location_in_id, location_out_id
- stock.quant: location_id
- stock.quant.relocate: dest_location_id
- stock.replenishment.option: location_id
- stock.rule: location_dest_id, location_src_id
- stock.scrap: location_id, scrap_location_id
- stock.warehouse: 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.warehouse.orderpoint: location_id
- stock.warn.insufficient.qty: location_id
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 -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}'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.