agentleFS
TransgeniaTransgenia/MCP-Odoo-Tools-CE-EE-and-online/skills/odoo-studio-style/SKILL.md

odoo-studio-style

Skill4 starsChanged 9 days agoMITView on GitHub

Do Odoo Studio-style low-code changes (custom fields, views, automations) over RPC — on Community or Enterprise, without the Studio app. Use when the user wants to add a field, tweak a view, or automate a simple action.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before you call an Odoo tool: if odoo_version is not in your tool list, this plugin's MCP server is not running in this session.

    line 17
  2. Very specific:

    Use the odoo_add_field tool.

    line 46
  3. Distinctive:

    After creating a field, add it to a form/tree view (see step 2) so users can see it.

    line 62
  4. Very specific:

    Prefer xpath ... position="after|before|inside|replace" over full-view rewrites.

    line 80
  5. Very specific:

    Use odoo_add_automation. The python runs under Odoo safe_eval.

    line 83
  6. Distinctive:

    Read the record back and confirm the effect:

    line 116

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Studio-style low-code changes (CE & EE)

Odoo Studio is an Enterprise-only visual editor. The customizations it makes — custom fields, views, automated actions — are ordinary Odoo records stored in the database. This plugin can create those same records over RPC, so you get the common Studio outcomes on Community too, without the license.

Be honest about the boundary: this covers small, low-code changes (a field, a view tweak, a simple automation). It is not a substitute for serious module development (packaged code, migrations, tests, complex business logic).

Before you call an Odoo tool: if odoo_version is not in your tool list, this plugin's MCP server is not running in this session. Follow step 0 of /odoo-tools:odoo-doctor before anything else, and do not run shell commands, check Python or give Odoo-side advice first. In Cowork and Claude chat the Odoo tools do not run at all: the user can open the Code tab of Claude Desktop or Claude Code, where the plugin is synced to the same account, or ask Transgenia for assisted setup (dev@transgenia.org · WhatsApp +52 55 8034 0405).

Permission profile: builder

Since 1.5.0 the default permission profile (standard) treats fields, views and automations as customization: odoo_add_field and odoo_add_automation are not listed, and an odoo_create on ir.ui.view is refused. These recipes need the Permission profile builder (or full), which the user sets in /plugin → odoo-tools → Configure options, then reconnects (/mcp). Recommend builder on sandboxes and staging only: automations run Python on the Odoo server, so for confidentiality builder equals full. Never change the option or a policy file yourself; if a call is refused by the permission policy, tell the user which profile the step needs and stop.

Two more limits hold under builder: a field whose name looks like a credential (x_api_token) is withheld from reads, and website.page writes also need its view (ir.ui.view), which builder opens.

Where changes live

In the instance/DB, exactly like Studio — not as module code in a repo. They survive upgrades as manual customizations. (If you need code-in-a-repo, that is module development, which is out of scope for this plugin.)

1. Add a custom field

Use the odoo_add_field tool. It creates a state='manual' field and forces the required x_ name prefix.

odoo_add_field {
  "model": "res.partner",
  "name": "loyalty_points",         // becomes x_loyalty_points
  "label": "Loyalty Points",
  "field_type": "integer"
}

Relational example:

odoo_add_field { "model": "res.partner", "name": "account_manager",
  "label": "Account Manager", "field_type": "many2one", "relation": "res.users" }

Selection example: pass selection as [["a","A"],["b","B"]]. After creating a field, add it to a form/tree view (see step 2) so users can see it.

2. Tweak a view (inherited)

There is no dedicated tool; use odoo_create on ir.ui.view with an inherited arch so you never overwrite the base view. First find the view to extend:

odoo_search_read { "model": "ir.ui.view", "domain": [["model","=","res.partner"],["type","=","form"]],
  "fields": ["name","xml_id"], "limit": 5 }

Then create an inherited view:

odoo_create { "model": "ir.ui.view", "values": {
  "name": "res.partner.form.x_loyalty",
  "model": "res.partner",
  "inherit_id": <base_view_id>,
  "arch_db": "<xpath expr=\"//field[@name='email']\" position=\"after\"><field name=\"x_loyalty_points\"/></xpath>"
}}

Prefer xpath ... position="after|before|inside|replace" over full-view rewrites.

3. Add an automation

Use odoo_add_automation. The python runs under Odoo safe_eval; the tool validates it before sending, which matters most on Odoo online/SaaS where arbitrary python is refused server-side.

odoo_add_automation {
  "model": "crm.lead",
  "name": "Tag hot leads",
  "trigger": "on_create_or_write",
  "code": "for rec in records:\n    if rec.probability and rec.probability > 80:\n        rec.write({'priority': '3'})"
}

safe_eval rules (enforced by the tool): no import/def/class/return/ with, no underscore/dunder access, no attribute assignment and no del (Odoo forbids STORE_ATTR/DELETE_ATTR: rec.field = value fails server-side; building plain dicts such as vals['a'] = 1 is fine). Available names include env, model, record/records, datetime, dateutil, time, UserError. To return an action, assign action = {...} as the last statement (never return).

Version notes. Exception name: UserError on v13+, Warning on v10-12. Automation model: base.automation on v11+, legacy base.action.rule (module base_action_rule) on v10. Recipes that create ir.model.fields / ir.ui.view / automations / ir.actions.server require an administrator (Settings / Technical) — a least-privilege business user gets AccessError.

Enterprise vs Community

  • Fields/views/automations created here work on both editions.
  • On Enterprise, they won't appear inside the Studio editor UI (they aren't tagged as web_studio customizations), but they behave identically at runtime.
  • Enterprise-only models (e.g. documents.document) still can't be targeted on Community — the compat layer raises a clear error.

Verify (Definition of done)

Read the record back and confirm the effect:

  • field: odoo_fields_get { "model": "<model>" } shows the new x_ field.
  • view: open the form in Odoo (or read the inherited ir.ui.view).
  • automation: trigger it on one record and read the changed field.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.