Skip to content
Closed
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
1 change: 1 addition & 0 deletions content/applications/productivity/ai.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ AI
.. toctree::

ai/agents
ai/fields
2 changes: 2 additions & 0 deletions content/applications/productivity/ai/agents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Agents are formed of two main components, *Topics* and *Sources*.
While many AI features can be used in Odoo without the **AI** application, creating and
customizing agents requires that the **AI** application is installed.

.. _ai/agents/prompts-in-odoo:

AI prompts in Odoo
==================

Expand Down
102 changes: 102 additions & 0 deletions content/applications/productivity/ai/fields.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
=========
AI fields
=========

.. |AI| replace:: :abbr:`AI (Artificial Intelligence)`

|AI| fields allow users to utilize Odoo's built-in AI capabilities directly in forms and records.
When an |AI| field is configured, the system can generate or suggest values automatically based on
the record's context, existing data, or external information.

This feature is especially useful for creating product descriptions, summarizing notes, or
generating structured content from unstructured data.

.. _ai/add-a-new-field:

Adding a new AI field
=====================

|AI| fields can be added to a record through the Studio app or property field.

.. warning::
:ref:`Installing Studio <general/install>` may impact the current pricing plan for a database.
For more information, refer to `Odoo's pricing page <https://www.odoo.com/pricing-plan>`_ or
contact your account manager.

First, navigate to the page in the database where a new field is needed. Then, click on the
:icon:`oi-studio` :guilabel:`studio` icon to open the app. On the left sidebar, click and drag the
:guilabel:`AI Field` option and place it in the desired location on the record.

.. image:: fields/new-ai-field.png
:alt: Adding a new field to a record.

After the field is placed, an :guilabel:`Add an AI Field` pop-up opens. Use the :guilabel:`Field
Type` drop-down menu to select a :doc:`field type <../../studio/fields>`:

- Text
- Multiline Text
- HTML
- Integer
- Decimal
- Monetary
- Date
- Datetime
- Checkbox
- Many2one
- Tags

Next is the :guilabel:`Prompt` field. In Odoo, :ref:`prompts <ai/agents/prompts-in-odoo>` define the
instructions that guide the |AI| when generating or improving the content of the |AI| field. The
prompt tells the system what kind of information to produce, how to format it, and what tone or
style to use.

When creating a prompt, use the `/field` command to reference specific fields in the database. For
example, to reference the :guilabel:`Company` field on a record, enter `/field`, and click the
:guilabel:`Field Selector` option. Type `Company` in the search bar, and select :guilabel:`Company`
from the list.

.. image:: fields/prompt.png
:alt: The add a field pop-up where the ai prompt is entered.

Once the prompt is complete, click :guilabel:`Add Field`. Before closing **Studio**, click on the
left sidebar and update the :guilabel:`Label` field with a title for the new |AI| field. Then click
:guilabel:`Close` to exit **Studio**.

After the field is added, click the |AI| icon to refresh the field value.

.. tip::
If the |AI| is unable to complete the request, a warning message is generated. This could mean
that the prompt is asking for information that is not available, in the given context, or that
the prompt is providing unclear instructions. Use this as an indication to revisit the prompt and
add additional context or instructions.

.. image:: fields/warning.png
:alt: A warning message indicating the AI was unable to complete the request.

Add via edit properties
-----------------------

|AI| fields can also be added as property fields without opening the **Studio** app. Click on the
:icon:`fa-cog` :guilabel:`Actions` icon and select :icon:`fa-cogs` :guilabel:`Edit Properties`. Tick
the :guilabel:`AI` checkbox, confirm the field should be |AI|-enabled, then follow the steps
:ref:`above <ai/add-a-new-field>` to define the field type and enter the prompt.

.. image:: fields/edit-properties.png
:alt: The edit properties pop-up on a form view.

.. note::
:ref:`Property fields <property_field/add>` can only be added to form views.

Computing AI fields
===================

To compute, or refresh, an |AI| field, click on the |AI| icon next to the field. Clicking the button
updates the field based on the prompt.

Additionally, a scheduled action runs once a day to compute all |AI| fields. This action is active
by default.

.. tip::
To run the scheduled action manually, navigate to :menuselection:`Settings app --> Technical -->
Automation --> Scheduled Actions`. Click on :guilabel:`AI Fields\:\ Compute AI fields` to open
it, then click :guilabel:`Run Manually`.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.