From odoo-crm-toolkit
Create and manage CRM opportunities (crm.lead) in Odoo 18 via XML-RPC API. Use this skill when the user asks to "create an opportunity", "add a lead", "add to CRM", "create CRM record", "new sales opportunity", "přidej příležitost", "vytvoř lead", "přidej do CRM", "nová obchodní příležitost", "založ příležitost", or any request involving creating, searching, or managing CRM leads/opportunities in Odoo 18.
How this skill is triggered — by the user, by Claude, or both
Slash command
/odoo-crm-toolkit:crm-opportunitiesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create and manage CRM leads and opportunities in Odoo 18 via XML-RPC API.
Create and manage CRM leads and opportunities 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 and field reference.
Same environment variables as other Odoo skills:
ODOO_URL, ODOO_DB, ODOO_API_KEY (UID se zjistí automaticky přes authenticate)lead_id = models.execute_kw(DB, UID, KEY, 'crm.lead', 'create', [{
'name': 'Opportunity Title — Company Name',
'type': 'opportunity', # 'lead' or 'opportunity'
'partner_id': partner_id, # link to res.partner
'email_from': '[email protected]',
'phone': '+420...',
'website': 'https://company.cz',
'expected_revenue': 15000.0,
'probability': 30.0,
'description': '<p>Detailed description of the opportunity</p>',
'tag_ids': [(6, 0, tag_ids)], # set tags
}])
stages = models.execute_kw(DB, UID, KEY, 'crm.stage', 'search_read', [
[]
], {'fields': ['name', 'sequence'], 'order': 'sequence ASC'})
opportunities = models.execute_kw(DB, UID, KEY, 'crm.lead', 'search_read', [
[['partner_id', '=', partner_id]]
], {'fields': ['name', 'stage_id', 'expected_revenue', 'probability', 'create_date']})
models.execute_kw(DB, UID, KEY, 'crm.lead', 'write', [
[lead_id],
{'stage_id': target_stage_id}
])
tags = models.execute_kw(DB, UID, KEY, 'crm.tag', 'search_read', [
[]
], {'fields': ['name', 'color']})
tag_id = models.execute_kw(DB, UID, KEY, 'crm.tag', 'create', [{
'name': 'Web Prospect',
'color': 4, # 0-11 color index
}])
The description field supports HTML. For prospect opportunities, structure it as:
<div>
<h3>Popis příležitosti</h3>
<p>What the opportunity is about</p>
<h3>Scope</h3>
<ul>
<li>Tvorba nového webu</li>
<li>SEO optimalizace</li>
<li>Hosting a údržba</li>
</ul>
<h3>Cenová nabídka</h3>
<table>
<tr><td>Web design</td><td>od X Kč</td></tr>
<tr><td>Měsíční údržba</td><td>od 890 Kč/měsíc</td></tr>
</table>
<h3>Další kroky</h3>
<p>Follow-up actions</p>
</div>
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