본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)48k · #5350

odoo-rpc-api

하는 일

이 에이전트는 다른 프로그램을 사업 관리 시스템인 Odoo에 연결하도록 돕습니다. 코드를 사용해 Odoo 안의 정보를 읽고, 만들고, 수정하고, 삭제할 수 있습니다.

사용하는 경우

  • ✓웹사이트나 앱을 Odoo에 연결할 때.
  • ✓Odoo에서 데이터 가져오기나 내보내기를 자동화하는 경우.
  • ✓회사가 사용하는 다른 도구와 Odoo를 통합할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-rpc-api/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-rpc-api/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“고객 이름을 가져오도록 제 웹사이트를 Odoo에 연결하려면 어떻게 해야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Odoo에서 접근하거나 수정하고 싶은 정보를 알려 주세요. Python이나 JavaScript 같은 언어로 필요한 코드를 생성해 연결과 작업을 수행하도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Odoo RPC API

Overview

Odoo exposes a powerful external API via JSON-RPC and XML-RPC, allowing any external application to read, create, update, and delete records. This skill guides you through authenticating, calling models, and building robust integrations.

When to Use This Skill

  • Connecting an external app (e.g., Django, Node.js, a mobile app) to Odoo.
  • Running automated scripts to import/export data from Odoo.
  • Building a middleware layer between Odoo and a third-party platform.
  • Debugging API authentication or permission errors.

How It Works

  1. Activate: Mention @odoo-rpc-api and describe the integration you need.
  2. Generate: Get copy-paste ready RPC call code in Python, JavaScript, or curl.
  3. Debug: Paste an error and get a diagnosis with a corrected call.

Examples

Example 1: Authenticate and Read Records (Python)

import os
import xmlrpc.client

url = 'https://myodoo.example.com'
db = 'my_database'
username = 'admin'
password = os.environ["ODOO_API_KEY"]  # Use API keys, not passwords, in production

# Step 1: Authenticate
common = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/common')
uid = common.authenticate(db, username, password, {})
print(f"Authenticated as UID: {uid}")

# Step 2: Call models
models = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/object')

# Search confirmed sale orders
orders = models.execute_kw(db, uid, password,
    'sale.order', 'search_read',
    [[['state', '=', 'sale']]],
    {'fields': ['name', 'partner_id', 'amount_total'], 'limit': 10}
)
for order in orders:
    print(order)

Example 2: Create a Record (Python)

new_partner_id = models.execute_kw(db, uid, password,
    'res.partner', 'create',
    [{'name': 'Acme Corp', 'email': 'info@acme.com', 'is_company': True}]
)
print(f"Created partner ID: {new_partner_id}")

Example 3: JSON-RPC via curl

curl -X POST https://myodoo.example.com/web/dataset/call_kw \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "call",
    "id": 1,
    "params": {
      "model": "res.partner",
      "method": "search_read",
      "args": [[["is_company", "=", true]]],
      "kwargs": {"fields": ["name", "email"], "limit": 5}
    }
  }'
# Note: "id" is required by the JSON-RPC 2.0 spec to correlate responses.
# Odoo 16+ also supports the /web/dataset/call_kw endpoint but
# prefer /web/dataset/call_kw for model method calls.

Best Practices

  • ✅ Do: Use API Keys (Settings → Technical → API Keys) instead of passwords — available from Odoo 14+.
  • ✅ Do: Use search_read instead of search + read to reduce network round trips.
  • ✅ Do: Always handle connection errors and implement retry logic with exponential backoff in production.
  • ✅ Do: Store credentials in environment variables or a secrets manager (e.g., AWS Secrets Manager, .env file).
  • ❌ Don't: Hardcode passwords or API keys directly in scripts — rotate them and use env vars.
  • ❌ Don't: Call the API in a tight loop without batching — bulk operations reduce server load significantly.
  • ❌ Don't: Use the master admin password for API integrations — create a dedicated integration user with minimum required permissions.

Limitations

  • Does not cover OAuth2 or session-cookie-based authentication — the examples use API key (token) auth only.
  • Rate limiting is not built into the Odoo XMLRPC layer; you must implement throttling client-side.
  • The XML-RPC endpoint (/xmlrpc/2/) does not support file uploads — use the REST-based ir.attachment model via JSON-RPC for binary data.
  • Odoo.sh (SaaS) may block some API calls depending on plan; verify your subscription supports external API access.
자주 묻는 질문

평소 쓰는 Odoo 비밀번호를 사용해도 되나요?

특히 운영 환경에서는 보안을 위해 비밀번호 대신 API 키를 사용하는 것을 권장합니다. 에이전트가 이 방법을 보여 줄 수 있습니다.

JSON-RPC와 XML-RPC란 무엇인가요?

프로그램끼리 인터넷으로 통신하기 위한 표준화된 방식입니다. Odoo는 이 방법을 사용해 다른 시스템이 상호작용하도록 합니다.

에이전트가 Odoo에서 새 고객을 만들어 줄 수 있나요?

네, 고객, 주문, 기타 데이터 같은 새 레코드를 만드는 코드를 생성할 수 있습니다.

상세 정보

작성자의 원본 설명

Expert on Odoo's external JSON-RPC and XML-RPC APIs. Covers authentication, model calls, record CRUD, and real-world integration examples in Python, JavaScript, and curl.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5350
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬