Odoo 19Extra ToolsFree

Field Lock After Approval

Lock fields by any condition, on any model, enforced in write() - not just a view attribute

The video below shows Field Lock After Approval running on a real Odoo 19 database. Want it driven against your own data, or a question answered first? Ask and we will set up a session.

Native Odoo locks fields after approval one model at a time, by hand: sale.order, purchase.order, and friends each hard-code their own "readonly once state is X" view attributes, one field at a time. Those are view-layer only - bypassable through any API call - and there's no shared, configurable mechanism, so any custom or less-common model gets nothing at all. This app adds one config screen: pick a model, build a condition with Odoo's own domain builder (any field, any operator, combined however you like), pick which fields to lock once that condition matches, and optionally which groups can still edit anyway. The check runs in write() itself, so it can't be bypassed the way a view attribute can.

What it does

Enforced in write(), not just the form

A view readonly attribute only stops the form. This runs on every write() call to the model - through the UI, an import, or an external API call alike. Code running as the superuser is exempt on purpose: Odoo writes that way during installs, upgrades and its own internal flows, and a lock that refused those would break the database rather than protect it. Automated actions run that way too, so treat an automation as inside the fence, not outside it.

Any field, any operator, no code

The condition uses Odoo's own domain builder - the same one behind every filter and automation rule. Combine any fields on the model, not just a single status field.

Screenshots

Field Lock After Approval in Odoo — screenshot rule

Requirements

  • Odoo 19.0, Community or Enterprise.
  • Odoo.sh or On-Premise only. Third-party apps cannot be installed on Odoo Online (SaaS) databases — check your hosting before buying.
  • Module mh_field_lock, version 19.0.1.0.12, licensed OPL-1.

Related apps

← All Odoo apps