Skip to content
Back to skills

Odoo

ASecurity

Use for ANY Odoo work (models, fields, overrides, views, security, reports, wizards, controllers, OWL, migrations, debugging). Look-up-first workflow: every model, field, method, view and xml id is checked with the `odoo-agent` tool (source index + live database) before it is written. Never write Odoo names or signatures from memory.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
developmentpythongoshellbashsqlawsdebugginggitapidatabase

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add AyushPatel2021/odoo-agent --skill odoo --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Odoo?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Odoo
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ayushpatel2021-odoo/badge)](https://www.skillsdirectory.com/skills/ayushpatel2021-odoo)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: odoo
description: "Use for ANY Odoo work (models, fields, overrides, views, security, reports, wizards, controllers, OWL, migrations, debugging). Look-up-first workflow: every model, field, method, view and xml id is checked with the `odoo-agent` tool (source index + live database) before it is written. Never write Odoo names or signatures from memory."
---

# Odoo: look it up, then write

Your memory of Odoo is a mix of versions 8 to 20. It is wrong often enough to break a module.
The source on disk is never wrong. So the rule of this skill is one line:

**Every Odoo name you write (model, field, method, view, xml id, signature) must have come from
`odoo-agent` output or from a source file you opened in this session. Never from memory.**

`odoo-where` answers from an index of the project's real addons path (core + enterprise + custom),
filtered to the modules installed in the project's database. It answers in about 1 second.

## Follow this skill strictly: nothing else reminds you

Nothing checks your work for you: no reminder before a request, after an edit or before you answer.
This skill is the only guide, so every step below is REQUIRED, not optional:
1. Look up before you write (Steps 0 to 3): every Odoo name from `odoo-agent` output or a file you opened.
2. After your work, before you answer: run the checks this kind of change needs (Step 4 lists them: `odoo-check`
   always, `test` / `try` / `screens` only where Step 4 says). Fix what they find in your change, run them again, and
   report their real output. Never say "done" without that output. A question or a look-up needs no check.

## Check what changed, not the whole project

A big project (many modules, a large module): check ONLY what this session changed, its files and the modules it
touched (`odoo-check` checks the lines you added; outside git name them: `odoo-check <module folder>`; `try` / `test`
/ `screens` the modules you changed). Check a whole module or the whole project only when the user asks for it.
A finding in code you did not change: ignore it and keep working on the change, unless the user asked about it, your
change depends on that code, or your change makes it break. Then fix it (or say why not) as part of the task.

## Step 0: know where you are (once per session)

```bash
odoo-agent info      # version, addons roots, the project card
odoo-agent env       # running servers (port, db, upgrade in progress?), the project db, python, free ports
```
Never hunt with `ps`, `ss` or `/proc`: `env` says it. If a server runs on the project's db, do not run
`-u`/`-i`; if an upgrade is running, wait.
Prints the Odoo version, the addons roots, the database used as filter, and the **project card**
(paths, DB, how to run and test, client rules). Follow the card. If it has `db: ?`, ask the user
which database, then write it into the card. No card? Run `odoo-agent init` in the project folder: it writes the
card from this machine (checkout, addons, database, python) and says what it could not find; ask the user only for
that, then save it with `odoo-agent init --set key=value` (cards live in `~/.config/odoo-agent/projects`).

The user pasted an `[odoo-agent pick]` block or an xpath line, maybe with `view:` / `action:` / `record:` lines under it (Odoo Lens): run `odoo_pick` on it first (shell: `odoo-agent pick -` with the text on stdin; `full: true` / `--full` for the component chain and .scss source): view / template, a tested xpath, the inherit snippet.

## Step 1: read the model as ONE page first

```bash
odoo-sheet sale.order               # or: --view list|kanban|search
```
A loaded Odoo assembles the merged truth: every field (type, comodel, stored or not, compute, selection
values, owning module), the FINAL view with all inheritance applied, which module adds what, access
rights, record rules, actions and menu paths. It also sees Studio fields and views edited in the UI.
Read it before touching a view, a domain, security or a menu. About 5 s, cached until the DB changes.
If the card says `live: no` or the DB is busy upgrading, it refuses: use `odoo-where`.

## Step 1b: before you USE a name, look it up

| You are about to write... | Run first | Then |
|---|---|---|
| `self.env['x.y']`, a `comodel`, `_inherit = 'x.y'` | `odoo-where x.y` | NOT FOUND = it does not exist. Use a name from "closest real names" or ask. |
| a field in a domain, view, `depends`, `vals` | `odoo-where x.y field` | Use the printed type and comodel. Domains/`_order` only on STORED fields. |
| any field list for a view or report | `odoo-where x.y --fields` | Pick from this list only. |
| a call to an existing method | `odoo-where x.y method` | Copy the signature from the first (base) entry. |
| `inherit_id ref="..."`, `env.ref(...)` | `odoo-where --xmlid module.id` | Open that file:line and read the arch. |
| an xpath into a core view | `odoo-where x.y --views`, then open the view | The xpath target must exist in the arch you READ, or in an inherited view above it. |

`NOT FOUND` is an answer, not an error to work around. Do not retry with a guessed variant;
read the "closest real names" line.

## Step 2: before you OVERRIDE, trace it

`odoo-agent trace sale.order.action_confirm` (or a menu / action xml id): what reaches it (buttons, crons,
server actions, JS, callers), its super() chain in RUN order, and what each definition calls, resolved to
model.method through record variables. Start a "what happens when the user clicks X" question here.

```bash
odoo-where sale.order action_confirm
```
The list is base first; each later entry wraps the one above it, and the custom module comes last.
Before writing the override:
1. Open the **base** entry: copy its exact signature and decorators (the output prints them).
2. Open the **last** entry above where yours goes: that is what your `super()` will call. Check
   what it returns and whether it already does what you want.
3. Override the public method the chain uses. Always call `super()` and return its result unless
   the task says to replace the behaviour.

## Step 3: write it the project's way

- How core writes a pattern here (a cron, a settings field, a header button, access rows, red list rows, a record
  rule, a wizard, a report): `odoo-agent example <pattern words>` (MCP: odoo_example), this version's idiom with
  file:line in one call. Use it before any grep of the source for an example.
- Version-specific syntax: `odoo-agent facts` (MCP: odoo_facts): the verified facts of THIS checkout's Odoo
  only. If your case is not there, check the source and do not guess. references/versions.md holds every
  version side by side: open it only when porting between versions.
- How a senior Odoo dev writes it (extend vs rewrite, view anchoring, integrity, performance, text):
  [references/senior.md](references/senior.md).
- Project-only rules (ticket comments, code placement for cherry-picks, client do/don't) are in the
  project card from Step 0, not here. Follow them only in that project.
- Match the surrounding module: open one neighbouring file of the same kind and copy its layout.
- A NEW module, when a person is there to answer: ask first what the request leaves open (who uses it, the
  flow and its states, the data, screens and outputs, edge cases, settings; at most 6 questions, each with
  your recommended answer), then build every answer. The card's `author`, `website`, `license`, `tests`
  are the project's preferences: if one is missing, ask once and save the user's answer with
  `odoo-agent init --set key=value`. A skipped question is no answer: use your recommended value in the module and
  save nothing to the card.
  Never `Odoo S.A.` or the "Part of Odoo" header in the user's module.
- odoo-agent's own settings are yours to change when the user asks (set it up, turn it on or off, change the
  project card): `./install.sh --yes` in the odoo-agent folder (the first setup: commands, skill, native tools),
  `odoo-agent init` (a card for this folder), `odoo-agent init --set key=value` (any card line: db, allow, agent,
  tests ...), `odoo-agent setup ...` (machine-wide). `odoo-agent help` lists them. Tell the user what you changed;
  a native-tools change needs an agent restart.

## Step 4: prove it

Run what the change needs, not everything every time:

| Your change | Run |
|---|---|
| a question, a look-up, a plan | nothing |
| a few lines of Python (a fix, a method) | `odoo-check`; the module's tests (`odoo-agent test`) when it has them, else one rolled-back `odoo-bin shell` run that would fail without the fix |
| a field, a model, security, a menu, a manifest change | `odoo-agent impact`, `odoo-check`, the module loads (`-u`), `test` when it has tests |
| data (records, crons, mail templates) | the row above, then `odoo-agent try` |
| a new module | the row above, then `odoo-agent try` and `odoo-agent screens` |
| a view, a report, JS, SCSS or a portal page | the row above, then `odoo-agent try` and `odoo-agent screens` |

`try` and `screens` take minutes: never for a one-line Python fix or a comment.

First `odoo-agent impact` (or `--since origin/<branch>`): every unit you added/changed/REMOVED, what still
uses removed code (will break), which views inherit a view you changed, install-time mistakes (model without
access rows, file missing from the manifest or __init__.py), and the test tags to run. Then `odoo-check`
(checks only the lines you added; `odoo-check --since origin/<branch>` for a whole branch). Not a git repo? A bare
`odoo-check` checks every module under the folder; `odoo-check <module folder>` checks one module. Run it again
after every rewrite of a whole file. A clean run prints `odoo-check: N files of M modules checked, no finding`:
without that line nothing was checked. Fix every ERROR and every WARN. If a WARN is wrong for this case, tell the user why instead of
working around it (a `cr.commit()` you keep needs a comment saying why).

Use the **test command from the project card**, not one you make up. When the table asks for a load: the module
loads (`-u <module> --stop-after-init` on the card's DB/port, or the card's safer alternative) and the log has no
ERROR or WARNING from your module. Logic changes get one test or
one rolled-back `odoo-bin shell` run that would fail without the change. Report the real output.
Follow the request on tests: if the user asked for no tests, or the project card says `tests: no`, write NO
test files (no tests/ folder) and check your work the way the conversation calls for (`odoo-agent try`). Tests you do write must run, green, after your last change (`odoo-agent test`).

Run the checks of the table above on the FINAL code (after your last change; nothing else will remind you):
odoo-agent test <module> (MCP: odoo_test) green, when it has tests; odoo-agent try <module> (odoo_try: installs it on
the card db, opens views, presses buttons, runs crons) with no problems, for a new module or a view / data change;
for a new module and after a view / JS / portal change also odoo-agent screens <module>
(odoo_ui do=screens; one screen: do=check). Screens also opens the forms of OTHER apps built on a view you extend
(a button added to the product template form shows on the variant form too: its method must exist on product.product).

## Step 5: leave it better

If you learned a fact about this project (DB, port, command, gotcha), update its card.
If you learned a fact about Odoo itself, with evidence (file:line), add one line to
`references/versions.md`. A lesson written down is a mistake the next model will not make.

## Read code by NAME, never by line slices

`odoo-agent show` prints exactly one unit, numbered like `cat -n` (ready for an Edit), with no line math:
- `odoo-agent show sale.order.action_confirm`: the base, what your super() lands on, every project override.
- `odoo-agent show sale.view_order_form`: the record, and every view that inherits it.
- `odoo-agent show path/file.py:123`: the whole method/record/component around that line.
- `odoo-agent outline <file | module>`: what is in it, with line ranges, before opening anything.
  The look-ups also work on the module you are building or fixing (map, outline, show model.method): use them
  there too instead of reading its files again piece by piece.
Do not `cat` a model file or `sed -n N,Mp` a slice: outline it, then `show` the unit you need. `show` marks the
lines a bug usually turns on (`! WRITE-ONCE` set only while empty, `! OVERWRITES` a create/write that replaces the
caller's value, `! FALSY-ID` an empty id in an `in` test, `! OVERRIDDEN` a call another module overrides); a raw slice
does not, and the flags it gets afterwards come one call late.
Do not grep core JS: `odoo-agent show ListController` / `ListController.setup` / `fields:many2one`.

New to a module? `odoo-agent map <module>` first: one page with the models it defines/extends, the core
methods it overrides, menus, actions, buttons, crons, routes, views, JS, security and its most-changed files.
Do not read its files one by one to learn it.

"Why did X happen when I changed Y?" `odoo-agent triggers <model> <field>`: computes depending on it (also
through relations), onchange, constraints, write overrides, tracking and the database's automation rules.

Need real data? `odoo-agent query <model> "[domain]" f1,f2 [--count | --group f | --limit N]` instead of an
ad-hoc `odoo-bin shell` script or psql: names, field paths, operators and stored-ness are validated first,
then it reads through the ORM, read-only.

Porting between versions? `odoo-agent compare 18 20 <model | model.member | xml_id>`: fields added /
removed / retyped, and a diff of the definition, instead of grepping two checkouts.

Before changing or removing a field/method/xml id: `odoo-agent uses <model.member | xml_id | name>`.

Look at the UI ONLY when the change is about the UI: a view, a QWeb / portal / website template, a dashboard,
JS or SCSS, or a whole new module before you say it is done. A Python-only fix, a field, a cron or a rule needs
no screen: its test proves it. Never write a browser script of your own. The browser stays open between looks:
- `odoo-agent ui check <action / menu xmlid | model | model,id | model id | menu path | /url> [--as portal]`: one
  screen, its errors and a screenshot (open the image only when you need to see the layout); about a second each.
  A record (`product.product 1599`) opens in its own company and must BE the screen reached, else FAIL; every result
  names its session (login, companies, the action's domain): read it before you blame a "cannot be found".
  It then clicks each menu / tab / nav button of the page (never save, delete, send): a `click X -> ERROR` line is a
  view that breaks when the user opens it
- `odoo-agent ui shot <target> --ref <png>`: when the user gave a design image: your screen beside it in one picture;
  compare the two before you say done. A page with a dark theme gets a dark screenshot too: look at both
- `odoo-agent ui click <label | button name from the code, e.g. action_approve>`, `ui fill <field> <value>`,
  `ui save`: press it, see the error / wizard / new status; everything is rolled back when the engine stops. A click
  that finds nothing names the page, its visible buttons and why a form button is hidden (invisible / groups)
- `odoo-agent ui download <report xmlid | /url> [--record id] [--find "<text>"]`: a real PDF or attachment through the
  user's session; `--find` gives a PNG of the PDF's part that starts at that text. `ui shot --box "<text|css>"` draws a
  red box around it in the screenshot
- `odoo-agent ui crawl`: every screen of the module (a big change only); `ui map` lists the screens with their
  targets (match a screenshot the user sends); `ui reload` after a code change; `ui stop` when done (it stops the
  browser too and says if anything is left)
- `odoo-agent ui save-test <module dir> <name>`: when the user wants a written test of what you just checked: the
  steps since the last `ui check` / `ui open` become an Odoo tour and its HttpCase test, run once
A screen whose views, templates and JS did not change since its last look answers from that look at once.
Changed JS? `odoo-agent ui hoot <module>` runs that module's Hoot tests (seconds) with the failing test's
name and assertion.
`certain` = provably this one (self/loop variables/field paths resolved through comodels, its views,
buttons, data). `ambiguous` = the same name on other models: open those lines before concluding.

## Tool reference

Native tools: with the `odoo` MCP server on (the installer adds it), the same lookups are tools in your list:
`odoo_show`, `odoo_where`, `odoo_fields`, `odoo_map`, `odoo_outline`, `odoo_uses`, `odoo_trace`, `odoo_triggers`,
`odoo_verify`.
Prefer them to the shell forms below; the answers are identical. In Codex they are named `mcp__odoo__odoo_show` and so
on; in code mode they are in ALL_TOOLS, not the declared list: `await tools.mcp__odoo__odoo_show({target: "..."})`.
`all_modules: "true"` on a look-up tool is the shell's `-d all`.
Before you present a diff, run `odoo_verify` on it (shell: `odoo-agent verify --patch answer.md`): it catches
view fields missing on the view's model, broken related/@api.depends paths, unregistered files, missing depends.

```
odoo-agent info                          version, roots, db filter, project card
odoo-agent show <target>                 one unit by name: model.member | xml id | template | JS symbol |
                                         framework/helper (BaseModel.write, float_compare) | file:line
                                         --all every definition, --module <m> one, --full no line cap
odoo-agent outline <file | module>       every unit with its line range
odoo-agent map [module]                  one page per module (default: the module you are in)
odoo-agent uses <target>                 every use: certain / likely / ambiguous, with the unit it sits in
odoo-agent where <model>                 defined where + every module extending it (load order)
odoo-agent where <model> <member>        every definition, base first (BaseModel root included)
odoo-agent where <model> --fields|--methods|--views,  where --xmlid <id>,  where --grep <text>
odoo-agent example <pattern words>       how core writes a pattern in this version (file:line), before any grep
odoo-agent sheet <model> [--view list]   live one-page truth from the database (read-only)
odoo-agent query <model> [domain] [fields] [--count | --group f | --limit N | --order "f desc" | --archived]
odoo-agent compare <verA> <verB> <target>  the same thing in two Odoo versions (verX = 18 | 20 | path)
odoo-agent render <model> <view type>     a screen element by element: base view + every inheriting view, which module adds what
odoo-agent senders <model>                what sends mail / runs crons on a model, as which user, with or without author
odoo-agent why <login> <target>           why that user cannot see / open / do it: menu | model,id | action | /route
odoo-agent writers <model> <field>        every place that sets the field (computes, create / write overrides, writes), flags WRITE-ONCE and OVERWRITES
odoo-agent trace <menu | action | model.method> [--depth N]   click -> code, chain in run order, calls
odoo-agent fixpoints <model.method | file:line>   BEFORE a bug fix diff: hooks + their overriders, callers, whole lists, core path + context flags
odoo-agent impact [--since rev]          what your diff touches and can break, install mistakes, tests to run
odoo-agent env                           servers (and who started each: you, an agent, the ui engine), ports, db, python
odoo-agent mail preview <template> <record>   an e-mail rendered on a record, no UI, nothing sent [--shot] [--html F]
odoo-agent edited [module ...]           views / e-mail templates edited in the database (by whom), before changing them in code
odoo-agent shell --safe [script.py]      odoo-bin shell for a scenario: rolled back, no mail, no print jobs (each listed)
odoo-agent ui check | click | fill | save | download | crawl | map | save-test | reload | stop
                                         Odoo's own browser tool kept warm: a screen, a button, a PDF in about a second
odoo-agent ui hoot <module>              the module's JS (Hoot) tests
odoo-agent check [files | --since rev]   version breakers (ERROR) + senior rules (WARN) in added lines
options: -d <db> | -d all   -p <addons,path>   --rebuild
```
The index is per Odoo checkout, filtered to the card's database (plus a module being built and all its manifest
depends, installed or not); project code is re-indexed on every
call and nothing stale is ever printed. `odoo-where`, `odoo-sheet`, `odoo-check` still work (aliases).
`show`/`where` read source; `sheet` reads the running database (Studio and UI edits included).

Files in this skill

  • SKILL.md20.4 KB
  • references/senior.md4.8 KB
  • references/versions.md8.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.