What it does
This module provides safe proxies (SQL views) for Odoo/Viindoo IR metadata models.
In many business apps (approvals, reporting, dynamic mapping, workflow automation…), end-users need to select models/fields/actions.
However, granting direct read access to system tables like ir.model, ir.model.fields, ir.actions.* is often restricted and may be a security risk.
This module exposes read-only public proxy models that keep IDs identical to the originals, so developers can integrate seamlessly,
while end-users can configure safely with only proxy ACLs.
Provided Proxy Models
- Models Metadata
* Proxy model: viin.ir.model.public (SQL view from ir.model)
* Exposes: model technical name, display name, order, info, state, transient flag, etc.
* ID identical to ir.model.id
- Fields Metadata
* Proxy model: viin.ir.model.fields.public (SQL view from ir.model.fields)
* Exposes: field name, label, type, relation, required, readonly, store, index, compute/related/depends metadata, etc.
* Note: Some sensitive fields are restricted by groups in the proxy model definition.
* ID identical to ir.model.fields.id
- Selection / Reference Options
* Proxy model: viin.ir.model.fields.selection.public (SQL view from ir.model.fields.selection)
* Exposes: field selection values/options safely.
* ID identical to ir.model.fields.selection.id
- Actions Metadata
* Proxy model: viin.ir.actions.act_window.public (SQL view from ir.actions.act_window)
* Proxy model: viin.ir.actions.server.public (SQL view from ir.actions.server)
* Exposes: basic metadata for action picking (name, state, usage, etc.)
* IDs identical to original action IDs
Runtime Fallback (Developer-Friendly)
This module also patches core IR models so that when a user does not have read access on the original model,
common operations fall back to the corresponding proxy model:
- search/fetch logic falls back to proxy recordset
- view loading (get_view/get_views) falls back to proxy
- opening form actions can be redirected to proxy model for non-admin users
This helps developers avoid ACL hacks and boilerplate code while keeping security boundaries intact.
Editions Supported
- Community Edition
- Enterprise Edition
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.