OdooWiki OCA HUB

Stock Location Warehouse

stock_location_warehouse folder_open OCA/stock-logistics-warehouse open_in_new
Stock Management License: LGPL-3

This module adds the associated warehouse to every location. If we have a tree of locations and sublocations, this module will update the associated warehouse every time we modify a location parent. If a location changes its father location, it will change its associated warehouse and all its childs too.

auto_awesome What this module does

AI-generated from the code · Odoo 14.0

Adds a Warehouse field to stock locations that is filled in automatically based on the location's parent hierarchy, so each location shows which warehouse it belongs to.

This module extends stock locations with a new Warehouse field. On the location form, the field appears right after the Company field, so users can see at a glance which warehouse a given location belongs to.

The value is not typed by hand: it is computed automatically from the location's position in the location tree. The module looks at the parent chain of the location and matches the second level of that chain against the view location of each warehouse. If a match is found, that warehouse is assigned to the location. Because the field is stored, the value is saved in the database and can be used in filters, groupings and reports.

When a location is moved under a different parent, the stored value is recalculated, so the warehouse association follows the new hierarchy. The computation also depends on the warehouses linked to the location, so changes on the warehouse side can trigger a refresh.

  • New field: Warehouse on stock locations.
  • Shown on the standard location form, after the Company field.
  • Filled automatically from the parent location hierarchy.
  • Stored, so it can be searched and grouped.
  • Recalculated when the location's parent path changes.

It touches the stock.location model and the stock.warehouse model through the link between warehouses and their view locations. No new menus or reports are added.

Depends on

stock
Models and fields (1)
  • stock.location · extends an existing modelwarehouse_id, warehouse_view_ids

Text generated by AI (DeepSeek) from reading the Odoo 14.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 14.0

Confirmed on 2026-11-03 in branch 14.0 of OCA/stock-logistics-warehouse.

terminal Installation and usage

OCA documentation · Odoo 14.0

To use the module, our instance must be configured first: We have to go to configuration > settings and check the box in the warehouse section called "storage locations".

The usage of this module is automatic but here's an explanation to force its behavior. Go to Configuration>Locations and select a location that at least has one child. Edit the location's "Parent Location" to a different one and save the changes. Once the changes are saved, "Associated Warehouse" will be updated with a new warehouse. After this, go to any of its children and check the info: if things go well, "Associated Warehouse" will have changed too.

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.