Ai Tool
Provides the base system to define, register, and run Odoo actions using AI. Allows external AI servers, MCP connections, and automation flows to interact safely and directly with Odoo database records.
Key Features Overview
Create custom Odoo functions and easily present them to AI systems as executable actions.
Register Actions with Code
Easily turn any Python function in your Odoo models into an action that the AI can trigger.
Automatic AI Instructions
Automatically builds the detailed formats and instructions that AI needs to run the action.
Flexible Action Scopes
Decide if an action is global (like checking today's date) or works on specific entries in your database.
Renders Chat Formatting
Automatically reads clean text styles (like bold or lists) sent by the AI and saves them nicely in Odoo.
Safe and Approved Actions
Checks all inputs before running to make sure the AI doesn't perform unsafe database changes.
Easy to Extend
A base system that other Odoo modules (like Sales, Inventory, or CRM) can use to add their own custom AI features.
Register Methods Easily with Decorators
Define input shapes, required arguments, and expected reply formats directly inside your custom Python models. The `@aitool` decorator formats and registers this metadata automatically.
Generic, Model, or Record Kinds
Run tools at different levels. Query system-wide stats, interact with entire tables, or execute targeted functions on a single active Odoo record.
Safe Chatter Actions & Formatting
Includes native tools like posting chatter messages. Automatically detects and parses markdown text generated by AI models and renders it as clean Odoo chatter HTML.
Frequently Asked Questions
Find quick answers to common questions about Odoo AI Tools.
What is the purpose of the Ai Tool module?
It is a technical base module. It provides Odoo developers with a clean way to register custom Odoo methods so that AI integrations can run them automatically.
How do I make a method available to the AI?
Add the @aitool
decorator to your Python method, defining the expected input/output fields, and register it in
Odoo using an ai.tool
XML record.
What happens if a tool execution encounters an error?
The module validates inputs before running a tool. If the record model doesn't match or required parameters are missing, it raises clear execution errors to prevent issues.
Does this module connect to OpenAI or Ollama?
No. This module does not connect to external AIs. It only defines the tools that other modules (like 'ea_ai_connection' or 'ea_ai_bridge') use to let the AI interact with Odoo.
Is Markdown rendering supported?
Yes. If the python 'markdown' library is installed, the module automatically converts markdown formatting from the AI into clean HTML before posting to Odoo Chatter.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 160 |
| Technical Name |
ea_ai_tool |
| License | LGPL-3 |
| Website | https://www.erpartists.com |
Please log in to comment on this module