OdooWiki OCA HUB

Stock Location Product Restriction

stock_location_product_restriction folder_open OCA/stock-logistics-warehouse open_in_new
Uncategorised License: AGPL-3

This module extends the functionality of stock to allow you to prevent to put items of different products into the same stock location.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Prevent mixing different products in the same stock location by setting a restriction on locations, with automatic checks and violation alerts.

This module lets you decide, per stock location, whether it may hold items of any product or only items of a single product. On the location form a new 'Restrictions' section shows the effective rule and lets you set a specific rule for that location and all its children; if no specific rule is set, the rule is inherited from the parent location.

When a location is restricted to one product, Odoo blocks operations that would put a different product into it. The check runs when stock quantities are updated (for example during receipts, deliveries or inventory adjustments) and raises an error naming the location and the conflicting products.

Locations already holding several products under a single-product rule are flagged: a red alert appears on the location form with a message listing the products found, a column shows the flag in the location list, and a search filter 'With restriction violation' finds them.

The module touches stock.location and stock.quant. It relies on the fill state of locations: locations currently being filled are temporarily exempt from the check so that incoming moves can complete.

Models and fields (2)
  • stock.quant · extends an existing modelbeing_filled_before_done_location_ids
  • stock.location · extends an existing modelproduct_restriction, has_restriction_violation, parent_product_restriction (Parent Location Product Restriction), specific_product_restriction, restriction_violation_message

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

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

terminal Installation and usage

OCA documentation · Odoo 16.0

By default, Odoo allows you to put items of any product into the same location. This behaviour remains the one by default once the addon is installed. Once installed, you can specify at any level of the stock location hierarchy if you want to restrict the usage of the location to only items of the same product. This property is inherited by all the children locations while you don't specify an other specific value on a child location. The constrains only applies location by location.

Once a location is configured to only contains items of the same product, the system will prevent you to move items of any others products into a location that already contains product items. A new filter into the tree view of the stock locations will also allow you to find all the location where this new restriction is violated.

No verified information in OCA: Installation, Configuration.

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.