From b338167936dc626f78bb9d79a6d47f17becfea55 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 30 Mar 2026 18:39:40 -0500 Subject: [PATCH] Update README with full architecture and upgrade notes --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a086cd..9de53da 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,54 @@ -# odoo-plugin-creation +# Odoo Plugin Creation -Odoo MCP plugin for Claude Cowork — connects to mpmedia.odoo.com covering Products, Knowledge, Contacts, Sales, CRM, Project, Helpdesk, Purchase, Inventory, and Employees. \ No newline at end of file +Claude Cowork plugin that connects to MPM's Odoo V18 instance at [mpmedia.odoo.com](https://mpmedia.odoo.com) via the XML-RPC API. No Odoo-side modules required — upgrade safe. + +## Modules Covered + +| Module | Odoo Model(s) | Tools | +|--------|--------------|-------| +| Products | `product.template`, `product.product` | search, get, stock levels | +| Knowledge | `knowledge.article` | search, get, create, update | +| Contacts | `res.partner` | search, get, create | +| Sales | `sale.order` | search, get, create | +| CRM | `crm.lead` | search, get, create, update, list stages | +| Project | `project.project`, `project.task` | list, get, search tasks, create/update tasks | +| Helpdesk | `helpdesk.ticket` | search, get, create, update, list teams | +| Purchase | `purchase.order` | search, get (with line items) | +| Inventory | `stock.quant`, `stock.move` | search stock, moves, list locations | +| Employees | `hr.employee`, `hr.department` | search, get, list departments | + +## Architecture + +- **Transport**: stdio (local Python process) +- **API**: Odoo XML-RPC at `/xmlrpc/2/` — no Odoo module needed +- **Auth**: API key (generated per-user in Odoo profile → Account Security) +- **Compatible**: Odoo V18 now; V19 JSON/2 API migration path available + +## Configuration + +Credentials are stored in `.mcp.json` under the `env` block: + +```json +{ + "ODOO_URL": "https://mpmedia.odoo.com", + "ODOO_DB": "mpmedia-odoo-sh-main-13285275", + "ODOO_USERNAME": "bgilliom@mpmedia.tv", + "ODOO_API_KEY": "your-api-key-here" +} +``` + +To rotate the API key: generate a new one in Odoo (My Profile → Account Security → API Keys), update `.mcp.json`, and rebuild the `.plugin` file. + +## Rebuilding the Plugin + +After making changes to `server/odoo_mcp.py`, `skills/`, or `.mcp.json`: + +```bash +cd /path/to/odoo-mpm && zip -r odoo-mpm.plugin . -x "*.DS_Store" -x "__pycache__/*" -x "*.pyc" -x ".git/*" +``` + +Then reinstall the `.plugin` file in Cowork. + +## V19 Upgrade Notes + +When upgrading to Odoo V19, the XML-RPC endpoint remains available (removal scheduled for V22). To migrate to the new JSON/2 API, replace the `_connect()` and `_call()` functions in `server/odoo_mcp.py` with HTTP requests to `/json/2//` using Bearer token auth.