Stock Available Base Exclude Location
This module is a technical base module to allow defining excluded locations on an Odoo model.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0This technical base module lets other Odoo modules exclude specific stock locations when calculating a product's available quantity. It provides a reusable mixin to store excluded locations or a location filter, and adjusts the product availability calculation accordingly.
This is a technical foundation module: on its own it does not add menus, buttons or reports. It gives developers a reusable building block so that other modules can decide which stock locations should be ignored when Odoo computes how much of a product is available.
It adds a mixin model, stock.exclude.location.mixin, that any other model can inherit. That mixin provides three fields:
- stock_excluded_location_ids: a list of stock locations to exclude.
- stock_excluded_location_domain_char: a text field where a location filter can be typed, defaulting to an empty list.
- stock_excluded_location_domain: a computed version of that filter, ready for use in searches.
It also extends product.product by overriding _get_domain_locations_new. When the context contains excluded locations or an excluded-location filter, those are added to the search rules used for stock quants and incoming/outgoing moves, so the excluded locations no longer count towards available quantities.
Because the module only reacts to context values, nothing changes in Odoo until another module or a developer supplies those values. It touches the product availability calculation and the stock location model, and is meant to be extended rather than used directly by end users.
Depends on
Required by other modules
Models and fields (2)
- product.product · extends an existing model
- stock.exclude.location.mixin · new modelstock_excluded_location_ids (Stock Excluded Locations), stock_excluded_location_domain, stock_excluded_location_domain_char (Domain to filter locations)
Text generated by AI (DeepSeek) from reading the Odoo 18.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-03Confirmation status: 4 confirmed, 5 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 18.0Usage
Source · Odoo 18.0In new module, inherit from "stock.exclude.location.mixin" model on the wanted model.
Then, when querying for product availability, add to context the key "excluded_location_ids" with your model "stock_excluded_location_ids" property.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
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.