AgentSkillsCN

odoo

Odoo ERP 集成——连接、智能探查并自动化您的 Odoo 实例

SKILL.md
--- frontmatter
name: odoo
description: Odoo ERP integration - connect, introspect, and automate your Odoo instance

/odoo

Odoo ERP integration via @marcfargas/odoo-client. Connect, query, and automate.

Quick Start

typescript
import { createClient } from '@marcfargas/odoo-client';

const client = await createClient();  // reads ODOO_URL, ODOO_DB, ODOO_USER, ODOO_PASSWORD

// Core CRUD — directly on client
const partners = await client.searchRead('res.partner', [['is_company', '=', true]], {
  fields: ['name', 'email'],
  limit: 10,
});

// Chatter — via client.mail service accessor
await client.mail.postInternalNote('crm.lead', 42, '<p>Called customer.</p>');
await client.mail.postOpenMessage('res.partner', 7, 'Order shipped.');

// Module management — via client.modules accessor
if (await client.modules.isModuleInstalled('sale')) { /* ... */ }

Service Accessors

Domain-specific helpers are accessed via lazy getters on the client:

AccessorDescriptionSkill doc
client.mail.*Post notes & messages on chattermail/chatter.md
client.modules.*Install, uninstall, check modulesbase/modules.md

Core CRUD (searchRead, create, write, unlink, etc.) stays directly on client.

Prerequisites (Must Read First)

Before any Odoo operation, load these foundational modules:

  1. base/connection.mdcreateClient(), authentication, environment variables
  2. base/field-types.md — Odoo type system (read/write asymmetry)
  3. base/domains.md — Query filter syntax

Additional Modules

Load as needed by reading base/{name}.md:

ModuleDescription
introspectionDiscover models & fields
crudCreate, read, update, delete patterns
searchSearch & filtering patterns
propertiesDynamic user-defined fields
modulesModule lifecycle management
skill-generationHow to create new skills

Mail & Messaging

Skills for Odoo's mail system. Load by reading mail/{name}.md:

ModuleDescription
chatterPost messages and notes on records (client.mail.*)
activitiesSchedule and manage activities/tasks
discussChat channels and direct messages

Note: The mail module is part of base Odoo and is typically always installed.

Version-Specific Notes

Breaking changes between Odoo versions are documented in CHANGES_V{XX}.md:

DocumentVersionKey Changes
CHANGES_V17.mdOdoo 17mail.channel → discuss.channel, read tracking

Module-Specific Skills

Skills that require specific Odoo modules to be installed. Before loading, verify the required modules are present using client.modules.isModuleInstalled().

Load by reading the path shown below:

SkillPathRequired ModulesDescription
accountingmodules/accounting.mdaccountAccounting patterns, cashflow, reconciliation, bank statements
timesheetsmodules/timesheets.mdhr_timesheetTrack employee time on projects and tasks
mis-builderoca/mis-builder.mdmis_builder, date_range, report_xlsxMIS Builder — reading, computing, exporting reports
mis-builder-devoca/mis-builder-dev.mdmis_builder, date_range, report_xlsxMIS Builder — creating & editing report templates, expression language, styling

Skill Generation Workflow

  1. Read base/introspection.md
  2. Introspect target model schema
  3. Create skills/{model-action}.md following the format in base/skill-generation.md
  4. Update this SKILL.md to reference the new skill