| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 421 |
| Technical Name |
company_field_visibility |
| License | OPL-1 |
| Website | https://parthcodex.netlify.app/ |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 421 |
| Technical Name |
company_field_visibility |
| License | OPL-1 |
| Website | https://parthcodex.netlify.app/ |
Field Visibility Manager
Control which fields each company sees â per model, per company, per field.
The Problem
In Odoo's multi-company setup, every company sharing the same database sees every field on every model. There is no built-in way to hide or restrict specific fields for specific companies.
Company A needs a Tax ID field on contacts. Company B does not. Today, both see it. This module fixes that.
Configure Rules in Seconds
Select a model, choose fields, set Hidden or Read Only per company. That is it.
Manage All Rules At a Glance
Hidden Fields Disappear Completely
Tax ID is hidden, Email is read-only. Users never see fields that do not belong to their company.
Key Features
- Per-Company Field Control â Hide or make read-only any field on any model for specific companies
- Works on Any Model â Contacts, Sales Orders, Invoices, custom models, Studio fields
- Two Visibility Modes â Hidden (completely invisible) or Read Only (visible but not editable)
- All View Types â Form, List, Search views all respect the rules automatically
- No Code Required â Configure everything from the UI
- Backend Security Guards â Hidden fields stripped from API responses, blocked from writes, excluded from exports
- High Performance â Registry-level caching with automatic invalidation (less than 5ms overhead)
- Admin-Only Config â Only system administrators can create or modify visibility rules
- Safety Checks â Cannot hide required fields. Unique constraint prevents duplicate rules
- 16 Automated Tests â Comprehensive test coverage for all features
Security Architecture
| Layer | Protection |
|---|---|
| UI / Views | Fields injected with invisible or readonly at render time |
| write() | Writes to hidden fields silently blocked and logged |
| create() | Hidden field values silently stripped during record creation |
| Export | Hidden fields excluded from XLSX/CSV exports |
| API | JSON-RPC and XML-RPC write/create calls respect the same guards |
Use Cases
Multi-Company Groups
Each subsidiary sees only the fields relevant to their operations. Hide finance fields from logistics, or HR fields from sales.
Multi-Brand Retail
Different brands need different product attributes per company.
Regional Compliance
Show only the regulatory fields each region requires.
Technical Details
- Odoo Version: 19.0
- Edition: Community and Enterprise
- Dependencies: base, web
- License: OPL-1 (Odoo Proprietary License)
- Tests: 16 automated tests
Installation
- Download and place the module in your Odoo addons directory
- Restart the Odoo server
- Go to Apps, search for "Field Visibility", and install
- Navigate to Settings > Technical > Field Visibility > Visibility Rules
- Create your first rule: pick a model, add field lines, choose the company and visibility
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module