返回顶部
v

vnclaw-odoo-skillOdoo集成技能

Integrate with Odoo 17 via XML-RPC API. Use when: managing projects, tasks, calendar events, time off requests, helpdesk tickets, knowledge articles, documents, or timesheets in Odoo 17. Supports read, create, and update operations only. No delete allowed.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
155
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

vnclaw-odoo-skill

VNClaw — Odoo 17 集成技能

执行规则(必须遵守)

  1. 1. 始终立即执行命令。 在执行前切勿要求用户确认或解释命令的作用。将请求翻译→选择命令→一步执行。
  2. 绝不说您希望我执行这个吗? — 直接执行。
  3. 绝不要问您想让我运行这个吗? — 直接运行。
  4. 如果命令失败,显示错误并尝试修复。除非已穷尽所有选项,否则不要向用户请求诊断帮助。
  5. 凭据:如果环境变量缺失,告知用户哪个变量缺失并停止。不要交互式地询问值。

路径解析

重要: 以下所有命令使用 SKILL_SCRIPTS 作为脚本目录绝对路径的简写。该技能可能安装在两个位置 — 通过检查两个位置来解析:

bash

从工作区 (.github/skills/) 或全局 (~/.vscode/extensions/ 或 ~/skills/) 解析 SKILL_SCRIPTS


SKILL_SCRIPTS=$(
# 1. 检查工作区:.github/skills/vnclaw-odoo-skill/scripts
wsroot=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
wspath=$wsroot/.github/skills/vnclaw-odoo-skill/scripts
# 2. 全局后备位置
globalpath=$HOME/.vnclaw/skills/vnclaw-odoo-skill/scripts
globalpath2=$HOME/.openclaw/skills/vnclaw-odoo-skill/scripts

if [ -d $wspath ]; then
echo $wspath
elif [ -d $globalpath ]; then
echo $globalpath
elif [ -d $globalpath2 ]; then
echo $globalpath2
else
# 最后手段:搜索文件系统
find $HOME /opt -type d -name vnclaw-odoo-skill -path /skills/ 2>/dev/null | head -1 | sed s|$|/scripts|
fi
)
echo SKILLSCRIPTS=$SKILLSCRIPTS

可能的安装位置:

位置类型路径
工作区技能<git-root>/.github/skills/vnclaw-odoo-skill/scripts/
用户全局 (vnclaw)
~/.vnclaw/skills/vnclaw-odoo-skill/scripts/ |
| 用户全局 (openclaw) | ~/.openclaw/skills/vnclaw-odoo-skill/scripts/ |

环境变量(必需)

凭据从环境变量加载。切勿硬编码凭据。

变量描述
ODOOURL基础 URL(例如 https://mycompany.odoo.com)
ODOODB
数据库名称 |
| ODOO_USERNAME | 登录用户名(邮箱) |
| ODOOAPIKEY | API 密钥或密码 |

通用功能(所有模块)

所有模块脚本共享以下能力:

  • - --my — 筛选当前认证用户的记录
  • 基于名称的查找 — 使用 --user Alice、--project Website 等代替 ID
  • 日期快捷方式 — --today、--yesterday、--this-week、--last-week、--this-month、--last-month、--this-year
  • 自定义日期范围 — --date-from 2026-03-01 --date-to 2026-03-31
  • 记录备注 — log-note 操作用于在记录上发布内部备注(在支持的地方)
  • 通知 — notify 操作用于按用户名安排活动通知(在支持的地方)
  • JSON 输出 — 所有脚本输出 JSON 到 stdout,日志输出到 stderr

tasks.py 的日期字段规则:默认情况下,日期快捷方式筛选 date_deadline。
要按任务创建时间筛选,始终添加 --date-field created。
要按任务最后更新时间筛选,使用 --date-field updated。

自然语言 → 命令映射

使用此表将常见用户请求翻译为正确的命令:

用户说...命令
我的任务tasks.py list --my
我这周的任务 / 截止日期在本周的任务
tasks.py list --my --this-week |
| 我这周创建的任务 / 本周创建的任务 | tasks.py list --my --this-week --date-field created |
| 今天创建的任务 | tasks.py list --my --today --date-field created |
| 本月创建的任务 | tasks.py list --my --this-month --date-field created |
| 今天更新的任务 / 最近修改的任务 | tasks.py list --my --today --date-field updated |
| 我这周的工时表 | timesheets.py list --my --this-week |
| 在项目X上记录2小时 | timesheets.py log --project X --hours 2 --description ... |
| 我这个月的工时表汇总 | timesheets.py summary --my --this-month |
| 我今天的日历 / 我今天的会议 | calendar_events.py list --my --today |
| 我的工单 / 分配给我的工单 | helpdesk.py list --my |
| 我今年的请假申请 | time_off.py list --my --this-year |

快速决策:使用哪个脚本

用户想要...脚本示例
列出/查看/创建/更新任务tasks.pypython3 $SKILLSCRIPTS/tasks.py list --my --this-week
列出/查看/创建/更新项目
projects.py | python3 $SKILLSCRIPTS/projects.py list --my | | 记录/查看/更新工时表 | timesheets.py | python3 $SKILL_SCRIPTS/timesheets.py log --project Website --hours 2 --description review | | 列出/查看/创建/更新日历事件 | calendarevents.py | python3 $SKILLSCRIPTS/calendar_events.py list --my --today | | 列出/查看/创建/更新帮助台工单 | helpdesk.py | python3 $SKILL_SCRIPTS/helpdesk.py list --my --this-week | | 列出/查看/创建/更新请假申请 | timeoff.py | python3 $SKILLSCRIPTS/time_off.py list --my --this-year | | 列出/查看/创建/更新知识文章 | knowledge.py | python3 $SKILL_SCRIPTS/knowledge.py list --my --published | | 列出/查看/创建/更新文档 | documents.py | python3 $SKILL_SCRIPTS/documents.py list --folder HR | | 访问任何用户定义/自定义模型 | customapp.py | python3 $SKILLSCRIPTS/custom_app.py list crm.lead --my --this-month | | 测试连接到 Odoo | odoocore.py | python3 $SKILLSCRIPTS/odoo_core.py test-connection |

模块:任务 (tasks.py)

管理 project.task。操作:list、get、create、update、log-note、notify、stages。

日期筛选字段 — 使用 --date-field 选择要筛选的日期:

  • - deadline (默认) — 按 datedeadline 筛选
  • created — 按 createdate 筛选(任务创建时间)
  • updated — 按 write_date 筛选(任务最后修改时间)

bash

我的任务


python3 $SKILL_SCRIPTS/tasks.py list --my

我本周创建的任务 ← created 需要 --date-field created

python3 $SKILL_SCRIPTS/tasks.py list --my --this-week --date-field created

我今天创建的任务

python3 $SKILL_SCRIPTS/tasks.py list --my --today --date-field created

我本月创建的任务

python3 $

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 vnclaw-odoo-skill-1776157262 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 vnclaw-odoo-skill-1776157262 技能

通过命令行安装

skillhub install vnclaw-odoo-skill-1776157262

下载

⬇ 下载 vnclaw-odoo-skill v0.1.0(免费)

文件大小: 36.3 KB | 发布时间: 2026-4-17 16:30

v0.1.0 最新 2026-4-17 16:30
Initial release of vnclaw-odoo-skill: Odoo 17 integration

- Integrate with Odoo 17 using XML-RPC API for project, task, calendar, helpdesk, knowledge, documents, and timesheet management.
- Supports read, create, and update actions (no delete).
- Natural language requests are mapped directly to script commands—no confirmation required.
- Resolves skill scripts from both workspace and global user locations.
- Handles all credential/setup errors strictly via environment variables.
- Features include user/name-based filtering, date shortcuts, custom date range, activity logging, notifications, and consistent JSON output across modules.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部