Skip to content

Commit 6642e85

Browse files
jero-odooFelicious
andcommitted
[ADD] AI: Ai fields
closes #15143 Signed-off-by: Jessica Rogers (jero) <jero@odoo.com> Co-authored-by: Felicia Kuan <feku@odoo.com> Co-authored-by: Felicia Kuan <feku@odoo.com>
1 parent 9678f9e commit 6642e85

File tree

7 files changed

+105
-0
lines changed

7 files changed

+105
-0
lines changed

content/applications/productivity/ai.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ AI
55
.. toctree::
66

77
ai/agents
8+
ai/fields

content/applications/productivity/ai/agents.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Agents are formed of two main components, *Topics* and *Sources*.
1818
While many AI features can be used in Odoo without the **AI** application, creating and
1919
customizing agents requires that the **AI** application is installed.
2020

21+
.. _ai/agents/prompts-in-odoo:
22+
2123
AI prompts in Odoo
2224
==================
2325

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
=========
2+
AI fields
3+
=========
4+
5+
.. |AI| replace:: :abbr:`AI (Artificial Intelligence)`
6+
7+
|AI| fields allow users to utilize Odoo's built-in AI capabilities directly in forms and records.
8+
When an |AI| field is configured, the system can generate or suggest values automatically based on
9+
the record's context, existing data, or external information.
10+
11+
This feature is especially useful for creating product descriptions, summarizing notes, or
12+
generating structured content from unstructured data.
13+
14+
.. _ai/add-a-new-field:
15+
16+
Adding a new AI field
17+
=====================
18+
19+
|AI| fields can be added to a record through the Studio app or property field.
20+
21+
.. warning::
22+
:ref:`Installing Studio <general/install>` may impact the current pricing plan for a database.
23+
For more information, refer to `Odoo's pricing page <https://www.odoo.com/pricing-plan>`_ or
24+
contact your account manager.
25+
26+
First, navigate to the page in the database where a new field is needed. Then, click on the
27+
:icon:`oi-studio` :guilabel:`studio` icon to open the app. On the left sidebar, click and drag the
28+
:guilabel:`AI Field` option and place it in the desired location on the record.
29+
30+
.. image:: fields/new-ai-field.png
31+
:alt: Adding a new field to a record.
32+
33+
After the field is placed, an :guilabel:`Add an AI Field` pop-up opens. Use the :guilabel:`Field
34+
Type` drop-down menu to select a :doc:`field type <../../studio/fields>`:
35+
36+
- Text
37+
- Multiline Text
38+
- HTML
39+
- Integer
40+
- Decimal
41+
- Monetary
42+
- Date
43+
- Datetime
44+
- Checkbox
45+
- Many2one
46+
- Tags
47+
48+
Next is the :guilabel:`Prompt` field. In Odoo, :ref:`prompts <ai/agents/prompts-in-odoo>` define the
49+
instructions that guide the |AI| when generating or improving the content of the |AI| field. The
50+
prompt tells the system what kind of information to produce, how to format it, and what tone or
51+
style to use.
52+
53+
When creating a prompt, use the `/field` command to reference specific fields in the database. For
54+
example, to reference the :guilabel:`Company` field on a record, enter `/field`, and click the
55+
:guilabel:`Field Selector` option. Type `Company` in the search bar, and select :guilabel:`Company`
56+
from the list.
57+
58+
.. image:: fields/prompt.png
59+
:alt: The add a field pop-up where the ai prompt is entered.
60+
61+
Once the prompt is complete, click :guilabel:`Add Field`. Before closing **Studio**, click on the
62+
left sidebar and update the :guilabel:`Label` field with a title for the new |AI| field. Then click
63+
:guilabel:`Close` to exit **Studio**.
64+
65+
After the field is added, click the |AI| icon to refresh the field value.
66+
67+
.. tip::
68+
If the |AI| is unable to complete the request, a warning message is generated. This could mean
69+
that the prompt is asking for information that is not available, in the given context, or that
70+
the prompt is providing unclear instructions. Use this as an indication to revisit the prompt and
71+
add additional context or instructions.
72+
73+
.. image:: fields/warning.png
74+
:alt: A warning message indicating the AI was unable to complete the request.
75+
76+
Add via edit properties
77+
-----------------------
78+
79+
|AI| fields can also be added as property fields without opening the **Studio** app. Click on the
80+
:icon:`fa-cog` :guilabel:`Actions` icon and select :icon:`fa-cogs` :guilabel:`Edit Properties`. Tick
81+
the :guilabel:`AI` checkbox, confirm the field should be |AI|-enabled, then follow the steps
82+
:ref:`above <ai/add-a-new-field>` to define the field type and enter the prompt.
83+
84+
.. image:: fields/edit-properties.png
85+
:alt: The edit properties pop-up on a form view.
86+
87+
.. note::
88+
:ref:`Property fields <property_field/add>` can only be added to form views.
89+
90+
Computing AI fields
91+
===================
92+
93+
To compute, or refresh, an |AI| field, click on the |AI| icon next to the field. Clicking the button
94+
updates the field based on the prompt.
95+
96+
Additionally, a scheduled action runs once a day to compute all |AI| fields. This action is active
97+
by default.
98+
99+
.. tip::
100+
To run the scheduled action manually, navigate to :menuselection:`Settings app --> Technical -->
101+
Automation --> Scheduled Actions`. Click on :guilabel:`AI Fields\:\ Compute AI fields` to open
102+
it, then click :guilabel:`Run Manually`.
8.18 KB
Loading
38 KB
Loading
10.5 KB
Loading
5.92 KB
Loading

0 commit comments

Comments
 (0)