Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions ai_automation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
=============
Ai Automation
=============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ac6598665c8047af8125789ebf827e8fd7744751b8aad883a0298b1b3c4be233
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fai-lightgray.png?logo=github
:target: https://github.com/OCA/ai/tree/18.0/ai_automation
:alt: OCA/ai
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/ai-18-0/ai-18-0-ai_automation
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/ai&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module integrates AI connections with Odoo server actions, allowing
you to define AI-powered automations. By default it provides Ollama
support, but it can be extended with additional providers by adding new
``kind`` options to ``ai.connection``.

**Table of contents**

.. contents::
:local:

Usage
=====

This module adds a new server action type: **AI OCA Action**.

To use it:

1. Go to ``Settings > Technical > Actions > Server Actions``
2. Create a new action and select **AI OCA Action** as the state
3. Select an AI Connection (Ollama)
4. Define the prompt — supports dynamic placeholders using Qweb syntax
(e.g. ``{{ object.name }}``)
5. Optionally select tools the AI can call during execution
6. Define what to do with the result:

- **Post Message**: posts the AI response as a chatter message on the
record
- **Update Record**: writes the AI response to a specific field

To extend with a new AI provider, inherit ``ai.connection`` and add a
new selection value to ``kind``, then implement the corresponding
``_run_{kind}`` method.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/ai/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/ai/issues/new?body=module:%20ai_automation%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Dixmit

Contributors
------------

- `Dixmit <https://www.dixmit.com>`__

- Enric Tobella

- `Vortex Dimensión Digital <https://www.dimensionvortex.com/>`__:

- Jorge Rosado Julián <jorge.rosado@dimensionvortex.com>
- Juan L. Sánchez <juan.sanchez@dimensionvortex.com>
- Wang Zhong Jiang <wang.zhong@dimensionvortex.com>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/ai <https://github.com/OCA/ai/tree/18.0/ai_automation>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions ai_automation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
23 changes: 23 additions & 0 deletions ai_automation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2026 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Ai Automation",
"summary": """
Integrate `ai_tools` with server actions to automate tasks using AI.
""",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Dixmit,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/ai",
"depends": ["ai_tool"],
"external_dependencies": {
"python": ["ollama"],
},
"data": [
"views/ir_actions_server.xml",
"security/ir.model.access.csv",
"views/ai_connection.xml",
],
"demo": [],
}
169 changes: 169 additions & 0 deletions ai_automation/i18n/ai_automation.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * ai_automation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: ai_automation
#: model:ir.actions.act_window,name:ai_automation.ai_connection_act_window
#: model:ir.model,name:ai_automation.model_ai_connection
#: model:ir.model.fields,field_description:ai_automation.field_ir_actions_server__ai_connection_id
#: model:ir.model.fields,field_description:ai_automation.field_ir_cron__ai_connection_id
#: model:ir.ui.menu,name:ai_automation.ai_connection_menu
msgid "AI Connection"
msgstr ""

#. module: ai_automation
#: model_terms:ir.ui.view,arch_db:ai_automation.ir_actions_server_form_view
msgid "AI OCA"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields.selection,name:ai_automation.selection__ir_actions_server__state__ai_oca
msgid "AI OCA Action"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ir_actions_server__ai_prompt
#: model:ir.model.fields,field_description:ai_automation.field_ir_cron__ai_prompt
msgid "AI Prompt"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ir_actions_server__ai_result_action
#: model:ir.model.fields,field_description:ai_automation.field_ir_cron__ai_result_action
msgid "AI Result Action"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ir_actions_server__ai_tool_ids
#: model:ir.model.fields,field_description:ai_automation.field_ir_cron__ai_tool_ids
msgid "AI Tools"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ir_actions_server__ai_update_record_field_id
#: model:ir.model.fields,field_description:ai_automation.field_ir_cron__ai_update_record_field_id
msgid "AI Update Record Field"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ir_actions_server__state
#: model:ir.model.fields,field_description:ai_automation.field_ir_cron__state
msgid "Action To Do"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__active
msgid "Active"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__create_uid
msgid "Created by"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__create_date
msgid "Created on"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__display_name
msgid "Display Name"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__id
msgid "ID"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__kind
msgid "Kind"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection____last_update
msgid "Last Modified on"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__write_uid
msgid "Last Updated by"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__write_date
msgid "Last Updated on"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ir_actions_server__mailing_model_real
#: model:ir.model.fields,field_description:ai_automation.field_ir_cron__mailing_model_real
msgid "Mailing Model Real"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__model
msgid "Model"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__name
msgid "Name"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields.selection,name:ai_automation.selection__ai_connection__kind__ollama
msgid "Ollama"
msgstr ""

#. module: ai_automation
#: model_terms:ir.ui.view,arch_db:ai_automation.ai_connection_form_view
msgid "Ollama configuration"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields.selection,name:ai_automation.selection__ir_actions_server__ai_result_action__post_message
msgid "Post Message"
msgstr ""

#. module: ai_automation
#: model:ir.model,name:ai_automation.model_ir_actions_server
msgid "Server Action"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,help:ai_automation.field_ir_actions_server__state
#: model:ir.model.fields,help:ai_automation.field_ir_cron__state
msgid ""
"Type of server action. The following values are available:\n"
"- 'Execute Python Code': a block of python code that will be executed\n"
"- 'Create a new Record': create a new record with new values\n"
"- 'Update a Record': update the values of a record\n"
"- 'Execute several actions': define an action that triggers several other server actions\n"
"- 'Send Email': post a message, a note or send an email (Discuss)\n"
"- 'Add Followers': add followers to a record (Discuss)\n"
"- 'Create Next Activity': create an activity (Discuss)\n"
"- 'Send SMS Text Message': send SMS, log them on documents (SMS)"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields.selection,name:ai_automation.selection__ir_actions_server__ai_result_action__update_record
msgid "Update Record"
msgstr ""

#. module: ai_automation
#: model:ir.model.fields,field_description:ai_automation.field_ai_connection__url
msgid "Url"
msgstr ""
Loading
Loading