Skip to content

Odoo Models

rafageist edited this page Nov 30, 2026 · 1 revision

Odoo Models

Window > Odoo models (and turbodoo models PATH [MODEL]) shows the models of the open folder's addons, read from their Python with ast: never imported or run.

Window > Odoo models: library.book, its fields with the module whose declaration counts, its extensions and relations

  • The window lists the modules, each with the models it defines (M) and extends (E). Typing filters by module, technical name or description.
  • Right unfolds a model: its fields (type, comodel, related, compute, inverse, and the module whose declaration counts, in the addons' dependency order), the fields it copies from its _inherit parents, the addons that extend it, its relations (relational fields, _inherits, parents), the fields of other models that point to it, and what stayed unresolved.
  • A relation unfolds once more into the target's relations: two steps at most, a neighbourhood, never the whole graph.
  • Enter on a model, a field, an extension or a relation opens the source at that line. Ctrl+R reads the folder again.

_name, _inherit (a string or a list), _inherits, _description, abstract and transient models and Python subclasses of model classes are understood. Static reading has limits, and they are shown rather than guessed: a model only extended in the folder (open the Odoo checkout, or a folder that holds both, to resolve base), a comodel, parent or _inherits target that is not there, and an _name computed at import time.

turbodoo models ~/src/odoo/addons                      # every model, by module
turbodoo models ~/src/odoo sale.order --depth 2 --incoming --json

Tests, migrations and files that never mention _name or _inherit are not parsed; Odoo Community 19's 640 addons are read in about 5 seconds. The live adapter, from a running instance's metadata, is the next step (see Connections and Instances).

Clone this wiki locally