From odoo-crm-toolkit
Analyze customer orders (sale.order) in Odoo 18 via XML-RPC API. Use this skill when the user asks to "analyze orders", "show customer orders", "order history", "sales analysis", "revenue analysis", "product analysis", "analyzuj objednávky", "ukáž objednávky", "historie objednávek", "analýza prodejů", "analýza tržeb zákazníka", or any request involving analyzing, summarizing, or reporting on sale.order data in Odoo 18.
How this skill is triggered — by the user, by Claude, or both
Slash command
/odoo-crm-toolkit:analyze-ordersThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze customer orders, revenue trends, and product performance in Odoo 18 via XML-RPC API.
Analyze customer orders, revenue trends, and product performance in Odoo 18 via XML-RPC API.
Before executing any API calls, read the shared reference at ${CLAUDE_PLUGIN_ROOT}/references/xmlrpc-api.md for connection setup.
Same environment variables: ODOO_URL, ODOO_DB, ODOO_API_KEY (UID se zjistí automaticky)
orders = models.execute_kw(DB, UID, KEY, 'sale.order', 'search_read', [
[['partner_id', '=', partner_id], ['state', 'in', ['sale', 'done']]]
], {
'fields': ['name', 'date_order', 'amount_total', 'state', 'invoice_status'],
'order': 'date_order DESC',
'limit': 100,
})
order_lines = models.execute_kw(DB, UID, KEY, 'sale.order.line', 'search_read', [
[['order_id', 'in', order_ids]]
], {
'fields': ['product_id', 'product_uom_qty', 'price_unit', 'price_subtotal', 'discount', 'order_id'],
})
orders = models.execute_kw(DB, UID, KEY, 'sale.order', 'search_read', [
[['date_order', '>=', '2025-01-01'], ['date_order', '<=', '2025-12-31'], ['state', 'in', ['sale', 'done']]]
], {
'fields': ['name', 'partner_id', 'date_order', 'amount_total'],
'order': 'date_order DESC',
})
# Use read_group for aggregation
revenue = models.execute_kw(DB, UID, KEY, 'sale.order', 'read_group', [
[['state', 'in', ['sale', 'done']]]
], {
'fields': ['partner_id', 'amount_total'],
'groupby': ['partner_id'],
'orderby': 'amount_total DESC',
'limit': 20,
})
monthly = models.execute_kw(DB, UID, KEY, 'sale.order', 'read_group', [
[['state', 'in', ['sale', 'done'], ['date_order', '>=', '2025-01-01']]]
], {
'fields': ['date_order', 'amount_total'],
'groupby': ['date_order:month'],
'orderby': 'date_order ASC',
})
products = models.execute_kw(DB, UID, KEY, 'sale.order.line', 'read_group', [
[['state', 'in', ['sale', 'done']]]
], {
'fields': ['product_id', 'price_subtotal', 'product_uom_qty'],
'groupby': ['product_id'],
'orderby': 'price_subtotal DESC',
'limit': 20,
})
Present analysis results in a clear, structured format:
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub michalvarys/claude-plugins --plugin odoo-crm-toolkit