Modern Python CLI for Odoo with support for helpdesk, projects, tasks, CRM, and knowledge articles
Project description
Vodoo
A modern Python CLI tool for Odoo with support for helpdesk tickets, project tasks, projects, and CRM leads/opportunities. Features include comments, notes, tags, attachments, and more.
🤖 AI-First Design: Designed to be used with Claude Code or similar AI coding assistants to streamline Odoo workflows through natural language commands.
Features
- 📋 Helpdesk tickets, project tasks, projects, CRM leads, and knowledge articles
- 💬 Add comments and internal notes
- 🏷️ Create, manage, and assign tags
- 📎 Upload, list, and download attachments
- 🔍 Search across text fields (name, email, phone, description)
- 🧰 Generic CRUD operations for any Odoo model
- 🎨 Rich terminal output with tables
- ⚙️ Flexible configuration via environment variables or config files
- 🔒 Type-safe with mypy strict mode
- 🚀 Modern Python tooling (uv, ruff, mypy)
Installation
From PyPI (recommended)
# Install via pip
pip install vodoo
# Or install via pipx (recommended for CLI tools)
pipx install vodoo
# Or run without installing using uvx (requires uv)
uvx vodoo helpdesk list
From source
This project uses uv for dependency management.
# Clone the repository
git clone https://github.com/julian-r/vodoo.git
cd vodoo
# Install dependencies
uv sync
# Install in development mode with dev dependencies
uv sync --all-extras
# Install the CLI tool
uv pip install -e .
Configuration
Create a configuration file with your Odoo credentials. The CLI looks for configuration in these locations (in order):
.vodoo.envin the current directory~/.config/vodoo/config.env.envin the current directory
Configuration File Format
Create a .env or .vodoo.env file:
ODOO_URL=https://your-odoo-instance.com
ODOO_DATABASE=your_database
ODOO_USERNAME=your_username
ODOO_PASSWORD=your_password_or_api_key
ODOO_DEFAULT_USER_ID=123 # Optional: default user ID for sudo operations
Environment Variables
All configuration values can also be set via environment variables with the ODOO_ prefix:
export ODOO_URL="https://your-odoo-instance.com"
export ODOO_DATABASE="your_database"
export ODOO_USERNAME="your_username"
export ODOO_PASSWORD="your_password"
Security & Service Accounts
For production use, run Vodoo with a dedicated least-privilege service account instead of a personal user. This keeps access scoped to the models your automation needs and avoids accidental exposure of customer data.
See docs/SECURITY.md for a concise setup checklist and recommended access rules.
# Create standard API groups
vodoo security create-groups
# Assign a bot user to all groups
vodoo security assign-bot --login service-vodoo@company.com
Usage
Using with Claude Code or AI Assistants
This CLI is designed to work seamlessly with AI coding assistants like Claude Code. Instead of remembering complex command syntax, you can use natural language:
Example workflow with Claude Code:
You: "Show me all tickets assigned to me that are in progress"
Claude: [runs: vodoo helpdesk list --assigned-to "Your Name" --stage "In Progress"]
You: "Add an internal note to ticket 123 saying we're waiting for customer response"
Claude: [runs: vodoo helpdesk note 123 "Waiting for customer response"]
You: "Download all attachments from ticket 456"
Claude: [runs: vodoo helpdesk attachments 456, then downloads each]
The CLI is designed with AI assistants in mind, providing clear command structure and helpful error messages.
Direct CLI Usage
Knowledge Articles
# List all articles
vodoo knowledge list
# List workspace articles only
vodoo knowledge list --category workspace
# List favorite articles
vodoo knowledge list --favorite
# Filter by name
vodoo knowledge list --name "Getting Started"
# Show article details (with content)
vodoo knowledge show 123
# Show raw HTML content
vodoo knowledge show 123 --html
# Add internal note
vodoo knowledge note 123 "Updated section on installation"
# Get article URL
vodoo knowledge url 123
CRM Leads/Opportunities
# List all leads/opportunities
vodoo crm list
# Search across name, email, phone, contact, description
vodoo crm list --search "acme"
vodoo crm list -s "john@example.com"
# List only leads or opportunities
vodoo crm list --type lead
vodoo crm list --type opportunity
# Filter by stage, team, user, or partner
vodoo crm list --stage "Qualified"
vodoo crm list --team "Direct Sales"
vodoo crm list --user "John Doe"
vodoo crm list --partner "Acme Corp"
# Combine search with filters
vodoo crm list --search "software" --type opportunity --stage "Proposition"
# Show lead details
vodoo crm show 123
# Add internal note (always allowed)
vodoo crm note 123 "Followed up via phone"
# Update lead fields
vodoo crm set 123 expected_revenue=50000 probability=75
# Attach a file
vodoo crm attach 123 proposal.pdf
# Get lead URL
vodoo crm url 123
Generic Model Operations
# Read records with a domain filter
vodoo model read res.partner --domain='[["email","ilike","@acme.com"]]' --field name --field email
# Create a record
vodoo model create res.partner name="Acme" email=info@acme.com
# Update a record
vodoo model update res.partner 123 phone="+123456789"
# Delete a record (requires confirmation)
vodoo model delete res.partner 123 --confirm
# Call a custom model method
vodoo model call res.partner name_search --args='["Acme"]'
For safety, use a least-privilege service account (see docs/SECURITY.md).
List Tickets
# List all tickets (default limit: 50)
vodoo helpdesk list
# Filter by stage
vodoo helpdesk list --stage "In Progress"
# Filter by partner
vodoo helpdesk list --partner "Acme Corp"
# Filter by assigned user
vodoo helpdesk list --assigned-to "John Doe"
# Set custom limit
vodoo helpdesk list --limit 100
View Ticket Details
# Show detailed information for a specific ticket
vodoo helpdesk show 123
Add Comments and Notes
# Add an internal note (not visible to customers)
vodoo helpdesk note 123 "This is an internal note for the team"
# Add a public comment (visible to customers)
vodoo helpdesk comment 123 "This is a public comment"
# Post as a specific user
vodoo helpdesk note 123 "Internal update" --user-id 42
vodoo helpdesk comment 123 "Admin comment" --user-id 42
Manage Tags
# List all available tags
vodoo helpdesk tags
# Add a tag to a ticket
vodoo helpdesk tag 123 5
Work with Attachments
# List attachments for a ticket
vodoo helpdesk attachments 123
# Download an attachment (saves to current directory with original name)
vodoo helpdesk download 456
# Download to a specific path
vodoo helpdesk download 456 --output /path/to/file.pdf
# Download to a specific directory (uses original filename)
vodoo helpdesk download 456 --output /path/to/directory/
Development
Code Quality
This project uses modern Python tooling:
- ruff: Fast linting and formatting
- mypy: Static type checking with strict mode
- uv: Fast dependency management
# Run ruff linting
uv run ruff check .
# Auto-fix ruff issues
uv run ruff check --fix .
# Format code
uv run ruff format .
# Run mypy type checking
uv run mypy src/vodoo
Project Structure
vodoo/
├── src/
│ └── vodoo/
│ ├── __init__.py
│ ├── main.py # CLI entry point with Typer commands
│ ├── client.py # Odoo XML-RPC client wrapper
│ ├── config.py # Configuration management
│ ├── auth.py # Authentication and sudo utilities
│ └── helpdesk.py # Helpdesk operations and display logic
├── pyproject.toml # Project configuration and dependencies
├── README.md
└── .gitignore
How It Works
Odoo XML-RPC API
This tool uses Odoo's external XML-RPC API to interact with the Odoo instance. The API provides:
- Authentication via username/password or API keys
- Full CRUD operations on Odoo models
- Search and filtering capabilities
- Support for sudo operations
Sudo Operations for Comments
Comments are posted using Odoo's message_post method with sudo context, allowing you to post messages as a specific user. Configure ODOO_DEFAULT_USER_ID to set the default user for comment operations.
Attachment Handling
Attachments are stored in Odoo's ir.attachment model with base64-encoded data. The CLI automatically decodes and saves files when downloading.
Requirements
- Python 3.12+
- Access to an Odoo instance with XML-RPC enabled
- Valid Odoo credentials (username/password or API key)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Development Setup
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/vodoo.git - Create a feature branch:
git checkout -b feature/my-new-feature - Install development dependencies:
uv sync --all-extras - Make your changes
- Run tests and checks:
uv run ruff check . uv run ruff format . uv run mypy src/vodoo
- Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/my-new-feature - Submit a pull request
Reporting Issues
Please report issues at: https://github.com/julian-r/vodoo/issues
Publishing to PyPI
This project is configured to automatically publish to PyPI using GitHub Actions with trusted publishing.
Setup (One-time configuration)
-
Configure PyPI Trusted Publisher:
- Go to https://pypi.org/manage/account/publishing/
- Add a new pending publisher with these details:
- PyPI Project Name:
vodoo - Owner:
semadox - Repository name:
vodoo - Workflow name:
publish.yml - Environment name:
pypi
- PyPI Project Name:
-
Configure TestPyPI Trusted Publisher (optional, for testing):
- Go to https://test.pypi.org/manage/account/publishing/
- Add the same configuration with environment name:
testpypi
-
Create GitHub Environments:
- Go to your repository settings → Environments
- Create environment
pypi(add protection rules if desired) - Create environment
testpypi(optional)
Releasing a new version
- Update the version in
pyproject.tomlandsrc/vodoo/__init__.py - Commit the version bump:
git commit -am "Bump version to X.Y.Z" - Create and push a git tag:
git tag vX.Y.Z && git push origin vX.Y.Z - Create a GitHub release from the tag
- The GitHub Action will automatically build and publish to PyPI
Manual testing with TestPyPI
To manually trigger a test publish to TestPyPI:
# From the GitHub repository, go to Actions → Publish to PyPI → Run workflow
Local build and test
# Build the package locally
uv build
# Install from local build
pip install dist/vodoo-*.whl
# Or test with TestPyPI
uv build
twine upload --repository testpypi dist/*
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Semadox GmbH
Acknowledgments
Built with:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vodoo-0.3.2.tar.gz.
File metadata
- Download URL: vodoo-0.3.2.tar.gz
- Upload date:
- Size: 55.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47f90f1215ea6a99f391eda2b908c91797bc0d34b49eae2006b37e8f4a2c5f78
|
|
| MD5 |
648d4411bfbe2e94de47675fe8e2bdf0
|
|
| BLAKE2b-256 |
20328a8d507a6f3ab8e1b45509c478f16420ca18334243d73885701171191260
|
Provenance
The following attestation bundles were made for vodoo-0.3.2.tar.gz:
Publisher:
publish.yml on julian-r/vodoo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vodoo-0.3.2.tar.gz -
Subject digest:
47f90f1215ea6a99f391eda2b908c91797bc0d34b49eae2006b37e8f4a2c5f78 - Sigstore transparency entry: 872192774
- Sigstore integration time:
-
Permalink:
julian-r/vodoo@4d186ea19d2bad5879bb76b14891dbf2c4bfb76f -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/julian-r
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d186ea19d2bad5879bb76b14891dbf2c4bfb76f -
Trigger Event:
release
-
Statement type:
File details
Details for the file vodoo-0.3.2-py3-none-any.whl.
File metadata
- Download URL: vodoo-0.3.2-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71b6f05495aed870913921b99d062601082298b0242afe6f40812808793cbdee
|
|
| MD5 |
a50805d6663cca31886dacbbe993bc74
|
|
| BLAKE2b-256 |
4ffcfd667f600ce3f7e80f211e8f80b49fe30aad44b7b5532072dbf351a1da79
|
Provenance
The following attestation bundles were made for vodoo-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on julian-r/vodoo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vodoo-0.3.2-py3-none-any.whl -
Subject digest:
71b6f05495aed870913921b99d062601082298b0242afe6f40812808793cbdee - Sigstore transparency entry: 872192775
- Sigstore integration time:
-
Permalink:
julian-r/vodoo@4d186ea19d2bad5879bb76b14891dbf2c4bfb76f -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/julian-r
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4d186ea19d2bad5879bb76b14891dbf2c4bfb76f -
Trigger Event:
release
-
Statement type: