Video: https://youtu.be/aNFLnLuRL18
An AI agent with an admin key can do everything the admin can, including deleting a customer with one prompt. The safer setup is simple to state: the agent works as the person who asked, with that person's rights, and only on what the admin allows. This article shows how that looks with the add-on AI Assistant Access for Odoo 18, 19 and 20, step by step, as in the video.
The add-on does not care which agent you use. It ships a small MCP connector, so any agent that can run a local MCP server works the same way: Claude Code, OpenAI Codex, GitHub Copilot, Gemini CLI, Cursor, Windsurf, Cline, Zed and others. The rules are enforced in Odoo, not in the prompt, so they hold whichever agent is on the other end. The video uses Claude Code as the example.
The result
The agent works as Mia Weber, a sales user. Asked how many sales orders it can see, it answers 12. The database has 30, but Mia only sees her own. Asked to change the phone number of the contact Muster Velo GmbH, it does, because Mia could do the same in the Odoo form. Asked to delete that contact, it cannot: the add-on gives the agent no delete call.
Step 1: the admin decides what may change
Under Settings > AI Assistant the admin turns on Allow editing. The field Editable models lists the models the agent may change. Here that is only res.partner, the contacts. Reading is limited to a fixed list of allowed models. There is no delete option anywhere, so no setting can switch it on by mistake.
Step 2: the user generates her own access
Mia opens My Preferences, tab AI Assistant, and clicks Generate read and edit access. After she confirms her password, Odoo shows a prompt with a one-time pairing code. The code works once and expires after 10 minutes. Mia copies the prompt into her AI agent.
Step 3: the agent pairs with that code
The agent checks Python, downloads the small connector odoo_ai_mcp.py from the Odoo server and runs its pair command with the code. The connector stores the key in a credentials file and tells the agent where it is. On Windows that is %APPDATA%\odoo-ai\, on macOS ~/Library/Application Support/odoo-ai/, on Linux ~/.config/odoo-ai/ (or $XDG_CONFIG_HOME). The agent never needs to open that file.
Step 4: reading, editing, no delete
Every request runs as Mia. Record rules and access rights apply exactly as in the Odoo interface, so the count is 12, not 30. The phone edit goes through because contacts are on the Editable models list and Mia may edit contacts. The delete request ends with the agent explaining that it is not allowed to delete or archive the contact. Its tool list has read, search, count, create and write calls, but nothing that deletes.
Editing off, reading on
When the admin turns Allow editing off again, the very next edit is refused with "Editing is disabled for this access, ask the Odoo administrator." Reading still works with the same key, and no key had to be revoked. Every call lands in the AI assistant audit, so the admin can review what the agent did.
Checklist
- Admin: Settings > AI Assistant, turn on Allow editing. Editable models lists only the models the agent may change (here: contacts). There is no delete option.
- User (Mia): My Preferences > tab AI Assistant > Generate read and edit access, confirm the password. Odoo shows a prompt with a one-time pairing code, valid for 10 minutes.
- Paste the prompt into your AI agent (Claude Code, Codex, Copilot, Gemini CLI, Cursor, ...). The agent downloads the small connector odoo_ai_mcp.py and runs its pair command with the code.
- The connector saves the key in a credentials file and tells the agent where: Windows %APPDATA%\odoo-ai\, macOS ~/Library/Application Support/odoo-ai/, Linux ~/.config/odoo-ai/ (or $XDG_CONFIG_HOME).
- The agent now works with Mia's rights: 12 of 30 orders (only her own), a phone number edit on a contact, and no delete tool at all.
- Admin turns Allow editing off: the next edit is refused, reading still works, no key is revoked. Every call is listed in the AI assistant audit.
Watch the video for the full flow. If you want a second pair of eyes on your Odoo rights before you connect an AI agent, tell us your case at devarc.ch.
AI Assistant Access is free and open source (LGPL-3), for Odoo 18, 19 and 20: https://github.com/devarc-gmbh/devarc-odoo-addons/tree/19.0/ai_assistant_access (branches 18.0, 19.0, 20.0). The supported agents and their config files are listed in docs/clients.md.
All names and data are fictional. Recorded on Odoo 19 Community. AI narrated.