| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 63 |
| Technical Name |
company_product_category_restrict |
| License | LGPL-3 |
| Website | https://odoo.co.ke |
| Versions | 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 63 |
| Technical Name |
company_product_category_restrict |
| License | LGPL-3 |
| Website | https://odoo.co.ke |
| Versions | 17.0 18.0 19.0 |
Inventory • Multi-Company
Product Category Company Restriction for Odoo
Managing product categories in a multi-company Odoo environment can become difficult when all companies share the same category structure. Product Category Company Restriction for Odoo solves this by allowing you to restrict product categories by company, helping each company work only with the categories relevant to its operations. This module is especially useful for organizations running multiple businesses, branches, subsidiaries, or departments in one Odoo database and wanting better control over category access
Compatible With
📸 Module Screenshots
Visual walkthrough of the Product Category Company Restrict module
1 Company Field on Product Category Form
A new Company field added directly below the Parent Category field in the Product Category form view.
Go to
Inventory → Configuration → Product Categories and open or create any
category.
Key Features
- Restrict product categories by company
- Improve data separation in multi-company Odoo environments
- Prevent users from selecting irrelevant categories
- Keep product organization clean and company-specific
- Support better data accuracy and access control
- Reduce confusion in shared multi-company databases
ir.rule record rule at the ORM
level, not just in the UI. This means it is enforced for all access methods —
including direct API calls, RPC, and URL manipulation.
Latest Release 19.0.1.0.0
2026-03-03- Initial Odoo 19 release.
- Added
company_idfield toproduct.category. - Auto-filtered category dropdown on product form by current company.
- Record rule enforcing multi-company category visibility at ORM level.
- Parent-child company consistency validation constraint.
- Company column added to category list view (optional show).
Support & Contact
support@odoo.co.ke
https://odoo.co.ke/helpdesk
+254739444447
1 business day SLA
# Product Category Company Restrict
Version: 18.0.1.0.0 Author: Metro ICT Limited Website: [https://odoo.co.ke](https://odoo.co.ke) Support: [support@odoo.co.ke](mailto:support@odoo.co.ke) License: LGPL-3 Category: Inventory Depends: product
---
## Overview
Product Category Company Restrict adds company-level visibility control to Odoo product categories, mirroring the same restriction logic already available on products themselves.
A Company field is added to each product category. When a company is set, the category is only visible and usable within that company. When left empty, the category is shared globally across all companies — fully backwards-compatible with your existing data.
---
## Key Features
|---|---| | Company field on categories | Added to the form view (below Parent Category) and as an optional list column | | Global (shared) categories | Leave Company empty to share across all companies | | Auto-filtered product dropdown | The Category field on products only shows categories for the current company or global ones | | Record-level security rule | Enforced via ir.rule — works for UI, API, and RPC access | | Parent-child constraint | Child category must match parent's company, or parent must be global | | Zero migration | Existing categories default to global — no data changes needed |
---
## Screenshots
|---|---|---| | 1 | Company field on the Product Category form | static/description/assets/screenshots/company_field.png | | 2 | Company restriction field visible on the Product form | static/description/assets/screenshots/company_restrict.png |
---
## How It Works
### 1. Assigning a Category to a Company Go to Inventory → Configuration → Product Categories, open any category, and set the Company field. That category will now only be visible to users operating under that company.
Leave the Company field empty to keep the category available across all companies (shared/global).
### 2. Auto-Filtered Dropdown on Products When creating or editing a product, the Category dropdown automatically filters to show only: - Categories with no company (global/shared), and - Categories belonging to the current active company
This prevents users from accidentally assigning categories from another company to a product.
### 3. Record Rule Enforcement A record rule (ir.rule) is applied to product.category for all internal users:
` domain: ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] `
This rule enforces visibility at the ORM level — it applies to: - The UI (list and form views) - External API calls (JSON-RPC, XML-RPC) - Any direct ORM access
### 4. Parent-Child Company Consistency A @api.constrains method prevents invalid parent-child combinations:
|---|---|---| | (empty / global) | Company A | ✅ Yes | | Company A | Company A | ✅ Yes | | Company A | (empty / global) | ✅ Yes | | Company A | Company B | ❌ Validation Error | | Company B | Company A | ❌ Validation Error |
---
## Installation
- Copy the product_category_company_restrict folder into your custom addons directory.
- Restart the Odoo server.
- Enable Developer Mode (Settings → General Settings → Developer Tools).
- Go to Apps → Update Apps List.
- Search for "Product Category Company Restrict" and click Install.
---
## Configuration
No extra configuration is required after installation. Simply:
- Go to Inventory → Configuration → Product Categories.
- Open any category and set the Company field to restrict it, or leave it empty to keep it global.
---
## Compatibility
|---|---| | Community | ✅ | | Enterprise | ✅ | | Odoo.sh | ✅ | | Odoo Online (SaaS) | ❌ (custom Python modules not allowed) |
---
## Module Structure
``` product_category_company_restrict/ ├── __init__.py ├── __manifest__.py ├── README.md ├── models/ │ ├── __init__.py │ └── product_category.py # company_id field + constraint + product domain ├── security/ │ ├── ir.model.access.csv # CRUD access for internal users │ └── product_category_rules.xml # Multi-company ir.rule ├── views/ │ └── product_category_views.xml # Form + list view inheritance └── static/
- └── description/
├── index.html ├── banner.png ├── hero.webp └── assets/
- └── screenshots/
- ├── company_field.png └── company_restrict.png
---
## Changelog
|---|---|---| | 2026-03-03 | 18.0.1.0.0 | Initial release — company restriction for product categories |
---
## Support
- Email: [support@odoo.co.ke](mailto:support@odoo.co.ke)
- Helpdesk: [https://odoo.co.ke/helpdesk/customer-support-1](https://odoo.co.ke/helpdesk/customer-support-1)
- Phone: +254739444447
- Response Time: 1 business day SLA
- 90-day complimentary support included with your purchase
---
Developed and supported by **Metro ICT Ltd.**
Please log in to comment on this module