This module adds 'restricted_product_type' to product_category model. With this optional selection field, 'restricted_product_type' should have the same values as in the product.template, 'type' field.
A constraint is also established in the product so that when the 'type' defined in the product does not match with the 'restricted_product_type' defined in the product category it raises a Validation Error.
Also, in the product category one would not be able to change the field 'restricted_product_type' if the category has been assigned at least to one product that already has this category, but has a different 'type' value.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Lets you set a "Restricted Product Type" on a product category so that only products of that type can be assigned to it, and automatically filters the category choices on the product form.
This module adds a new field called "Restricted Product Type" on product categories. You can pick one of the standard product types (for example Goods, Service, Combo) or leave it empty.
- On the product category form, the new field appears right after the parent category.
- On the product form, the category field is filtered: only categories whose restricted type matches the product's type (or that have no restriction) are offered.
- When you change the category on a product, if that category has a restricted type, the product's type is automatically set to that same value.
Business rules added: - A product cannot be saved if its type differs from the restricted type of its category; a validation error explains the mismatch. - A category's restricted type cannot be changed if it already contains products whose type does not match the new restriction; a validation error is raised.
It touches the product category, product template and product variant models, and adds a computed "Allowed Categories" field used only to build the category filter on the product form.
Depends on
Models and fields (3)
- product.product · extends an existing modelallowed_categ_ids (Allowed Categories)
- product.category · extends an existing modelrestricted_product_type (Restricted Product Type )
- product.template · extends an existing modelallowed_categ_ids (Allowed Categories)
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: 7 confirmed, 2 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/product-attribute.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0To use this module, you need to go to Inventory -> Configuration -> Product Categories and set a Restricted Product Type.
When a Restricted Product Type is assigned to a Product Category, if we then set a Product Type on a Product Template, the list of available Product Categories in the dropdown will be filtered with only the ones that have the same Restricted Product Type as the one set on the Product Template or have no Restricted Product Type set.
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.