odoo
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/odoo
/odoo
Odoo ERP integration via . Connect, query, and automate.
@marcfargas/odoo-client通过实现Odoo ERP集成。连接、查询并自动化操作。
@marcfargas/odoo-clientQuick 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')) { /* ... */ }typescript
import { createClient } from '@marcfargas/odoo-client';
const client = await createClient(); // 读取ODOO_URL、ODOO_DB、ODOO_USER、ODOO_PASSWORD环境变量
// 核心CRUD操作 — 直接通过客户端执行
const partners = await client.searchRead('res.partner', [['is_company', '=', true]], {
fields: ['name', 'email'],
limit: 10,
});
// 消息框(Chatter) — 通过client.mail服务访问器
await client.mail.postInternalNote('crm.lead', 42, '<p>已致电客户。</p>');
await client.mail.postOpenMessage('res.partner', 7, '订单已发货。');
// 模块管理 — 通过client.modules访问器
if (await client.modules.isModuleInstalled('sale')) { /* ... */ }Service Accessors
服务访问器
Domain-specific helpers are accessed via lazy getters on the client:
| Accessor | Description | Skill doc |
|---|---|---|
| Post notes & messages on chatter | |
| Install, uninstall, check modules | |
| Clock in/out, presence tracking | |
| Timer start/stop, time logging | |
Core CRUD (, , , , etc.) stays directly on .
searchReadcreatewriteunlinkclient领域特定的辅助工具可通过客户端的延迟获取器访问:
| 访问器 | 描述 | Skill文档 |
|---|---|---|
| 在消息框中发布笔记和消息 | |
| 安装、卸载、检查模块 | |
| 签到/签退、出勤追踪 | |
| 计时器启动/停止、工时记录 | |
核心CRUD操作(、、、等)直接通过执行。
searchReadcreatewriteunlinkclientPrerequisites (Must Read First)
前置条件(必读)
Before any Odoo operation, load these foundational modules:
- —
base/connection.md, authentication, environment variablescreateClient() - — Odoo type system (read/write asymmetry)
base/field-types.md - — Query filter syntax
base/domains.md
在执行任何Odoo操作前,请加载以下基础模块:
- —
base/connection.md、身份验证、环境变量createClient() - — Odoo类型系统(读写不对称性)
base/field-types.md - — 查询过滤语法
base/domains.md
Additional Modules
额外模块
Load as needed by reading :
base/{name}.md| Module | Description |
|---|---|
| introspection | Discover models & fields |
| crud | Create, read, update, delete patterns |
| search | Search & filtering patterns |
| properties | Dynamic user-defined fields |
| modules | Module lifecycle management |
| skill-generation | How to create new skills |
按需加载,请阅读:
base/{name}.md| 模块 | 描述 |
|---|---|
| introspection | 探查模型和字段 |
| crud | 增删改查(CRUD)模式 |
| search | 搜索与过滤模式 |
| properties | 动态用户定义字段 |
| modules | 模块生命周期管理 |
| skill-generation | 如何创建新Skill |
Mail & Messaging
邮件与消息
Skills for Odoo's mail system. Load by reading :
mail/{name}.md| Module | Description |
|---|---|
| chatter | Post messages and notes on records ( |
| activities | Schedule and manage activities/tasks |
| discuss | Chat channels and direct messages |
Note: The module is part of base Odoo and is typically always installed.
mail适用于Odoo邮件系统的Skill。请阅读进行加载:
mail/{name}.md| 模块 | 描述 |
|---|---|
| chatter | 在记录上发布消息和笔记( |
| activities | 安排和管理活动/任务 |
| discuss | 聊天频道和直接消息 |
注意: 模块是Odoo基础模块的一部分,通常默认已安装。
mailVersion-Specific Notes
版本特定说明
Breaking changes between Odoo versions are documented in :
CHANGES_V{XX}.md| Document | Version | Key Changes |
|---|---|---|
| Odoo 17 | mail.channel → discuss.channel, read tracking |
Odoo版本间的破坏性变更记录在中:
CHANGES_V{XX}.md| 文档 | 版本 | 主要变更 |
|---|---|---|
| Odoo 17 | mail.channel → discuss.channel、阅读追踪 |
Module-Specific Skills
特定模块Skill
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:
| Skill | Path | Required Modules | Description |
|---|---|---|---|
| accounting | | | Accounting patterns, cashflow, reconciliation, bank statements |
| attendance | | | Clock in/out, presence tracking ( |
| timesheets | | | Timer start/stop, time logging on projects ( |
| mis-builder | | | MIS Builder — reading, computing, exporting reports |
| mis-builder-dev | | | MIS Builder — creating & editing report templates, expression language, styling |
需要安装特定Odoo模块才能使用的Skill。加载前,请使用验证所需模块是否已安装。
client.modules.isModuleInstalled()请通过下方所示路径加载:
| Skill | 路径 | 所需模块 | 描述 |
|---|---|---|---|
| accounting | | | 会计模式、现金流、对账、银行对账单 |
| attendance | | | 签到/签退、出勤追踪( |
| timesheets | | | 计时器启动/停止、项目工时记录( |
| mis-builder | | | MIS Builder — 读取、计算、导出报表 |
| mis-builder-dev | | | MIS Builder — 创建和编辑报表模板、表达式语言、样式设置 |
Skill Generation Workflow
Skill生成流程
- Read
base/introspection.md - Introspect target model schema
- Create following the format in
skills/{model-action}.mdbase/skill-generation.md - Update this SKILL.md to reference the new skill
- 阅读
base/introspection.md - 探查目标模型架构
- 遵循中的格式创建
base/skill-generation.mdskills/{model-action}.md - 更新本SKILL.md以引用新Skill