OdooWiki OCA HUB

Model Read Only

model_read_only folder_open OCA/server-tools open_in_new
Tools License: AGPL-3

Module disables modification operations (write, create, delete) on selected model to selected users groups.

auto_awesome What this module does

AI-generated from the code · Odoo 14.0

Lets administrators make selected models read-only for chosen user groups, optionally only for records matching a filter. Blocked users get an access error when they try to create, edit or delete those records.

This module adds a way to lock down parts of Odoo so certain users can look at data but not change it.

Administrators configure it from the model settings: on any model's form (Settings > Technical > Models) there is a new "Readonly Restrictions" tab. There they add restriction lines, each choosing a model, an optional filter (domain) and one or more user groups.

  • If no groups are selected, the restriction applies to everyone (except the superuser).
  • If no filter is set, the whole model is protected; if a filter is set, only records matching it are protected.
  • When a user in a listed group tries to create, write or delete a protected record, Odoo raises an error saying they are not allowed to modify this record.

Reading is never blocked, and the superuser is always exempt. The check is added to the general access-rights mechanism, so it applies across all models that use it. The restriction records themselves are only manageable by users in the Settings group.

Depends on

base
Models and fields (3)
  • base · extends an existing model
  • ir.model · extends an existing modelreadonly_restriction_ids
  • model.readonly.restriction · new modelmodel_id, group_ids (Groups), model_name (Model Name), restriction_domain (Domain)

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

Confirmed on 2026-11-03 in branch 14.0 of OCA/server-tools.

terminal Installation and usage

OCA documentation · Odoo 14.0

Go to Settings > Technical > Models and select a model. Open tab "Readonly Restriction". Restrictions is implemented by ModelReadonlyRestriction model. You can create multiple restrictions lines. For each line you need to set Domain and Groups. If Groups is empty - restriction is applied for everyone. If Domain is empty - restriction is applied always.

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.