agentleFS
muhamedroshanmuhamedroshan/Odoo-Agent-Skills-Functional/skills/odoo-connect/SKILL.md

odoo-connect

Skill2 starsChanged 14 days agoMITView on GitHub

Connect to an Odoo server (versions 16-19, Community/Enterprise, on-premise/Odoo.sh/Odoo Online) via XML-RPC or the JSON-2 API, check version/edition/installed apps, list or create databases, install modules and read/write records with a dry-run mode and an audit log. Use whenever an agent must talk to a live Odoo instance.

  • Reads credentials

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

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

    Never hard-code or print credentials: Read them from .env (see .env.example in the repo root).

    line 11
  2. Very specific:

    Confirm the hosting type with the user: before anything else: Community on-premise, Enterprise on-premise, Odoo.sh, or Odoo Online (SaaS).

    line 12
  3. Very specific:

    Run every write with --dry-run first when you're unsure, and show the user what will change.

    line 19
  4. Very specific:

    Every write is logged to clients/<client>/logs/actions.jsonl.

    line 20
  5. Very specific:

    If the user gave you an existing empty database, use it.

    line 23
  6. Very specific:

    If the database manager is disabled (list_db = False) or the hosting is Odoo.sh/Online, ask the user to create the database manually and …

    line 25
  7. Very specific:

    Create a settings record and then execute it: call res.config.settings create --args '[{"group_multi_currency": true}]' → returns an id → …

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

Odoo Connect

Connects the agent to Odoo safely and traceably. Script: scripts/odoo_client.py (Python 3.8+, standard library only).

Rules

  1. Never hard-code or print credentials. Read them from .env (see .env.example in the repo root). If any are missing, ask the user.
  2. Confirm the hosting type with the user before anything else: Community on-premise, Enterprise on-premise, Odoo.sh, or Odoo Online (SaaS). Do not infer it from the URL alone. It changes what is possible:
    HostingCustom modulesDB creation over RPCStudio
    Community on-premYesYes (master password)No
    Enterprise on-premYesYes (master password)Yes
    Odoo.shYes (via Git)No (use the Odoo.sh UI or branches)Yes
    Odoo OnlineNoNo (use odoo.com)Yes
  3. Run every write with --dry-run first when you're unsure, and show the user what will change.
  4. Every write is logged to clients/<client>/logs/actions.jsonl. Set ODOO_CLIENT_DIR=clients/<client> first.

Choosing a database (in this order)

  1. If the user gave you an existing empty database, use it. Check it with check and confirm that only base modules are installed.
  2. Otherwise, ask the user for the master password and a database name, then run create-db. Ask whether to load Odoo demo data (the default is no, because we seed client-specific data).
  3. If the database manager is disabled (list_db = False) or the hosting is Odoo.sh/Online, ask the user to create the database manually and give you the credentials.

Choosing a transport

VersionTransportAuth
16, 17, 18XML-RPC /xmlrpc/2/*login + password or API key
19+JSON-2 /json/2/<model>/<method>API key (bearer) + X-Odoo-Database

The script picks the transport automatically from the server version. Set ODOO_FORCE_XMLRPC=1 to override.

Commands

S=skills/odoo-connect/scripts/odoo_client.py
python $S version                       # no auth needed
python $S list-dbs
python $S create-db --name demo_acme --lang en_US --country ae
python $S check                         # version, edition, API, companies, installed apps
python $S installed
python $S --dry-run install sale_management account stock
python $S install sale_management account stock
python $S search-read res.partner --domain '[["customer_rank",">",0]]' --fields name,email --limit 5
python $S create product.template '{"name":"Demo Chair","list_price":120}'
python $S write res.company 1 '{"name":"ACME LLC"}'
python $S call res.config.settings execute --ids 7

Using it from Python

import sys; sys.path.insert(0, "skills/odoo-connect/scripts")
from odoo_client import OdooClient, load_env; import os
load_env(); c = OdooClient(os.environ["ODOO_URL"], os.environ["ODOO_DB"], os.environ["ODOO_USER"], os.environ["ODOO_API_KEY"])
c.login(); print(c.major(), c.edition())

Changing settings (res.config.settings)

Create a settings record and then execute it: call res.config.settings create --args '[{"group_multi_currency": true}]' → returns an id → call res.config.settings execute --ids <id>.

Troubleshooting

  • Access Denied: wrong database, login or key. On 19+, the API key must belong to the user.
  • A module is reported "not available": it is Enterprise-only or missing from the addons path. Log it as a question or limitation; do not work around it silently.
  • On Odoo Online, XML-RPC requires an API key and is limited by plan. Confirm with the user.

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.