[IMP] studio: typeahead search, primary vs secondary buttons, sequence

task-5190016

closes odoo/documentation#14987

Signed-off-by: Audrey Vandromme (auva) <auva@odoo.com>
This commit is contained in:
mcsi-odoo
2025-10-23 14:23:02 +02:00
parent 0fa2de3b2d
commit 7209c4887b
7 changed files with 39 additions and 8 deletions

View File

@@ -322,12 +322,24 @@ Select an existing sequence or, to create a new sequence:
#. Click :guilabel:`Search more`, then click :guilabel:`New`.
#. In the window that opens, enter the :guilabel:`Name` of the sequence.
#. Configure the sequence, adding a :guilabel:`Prefix` and/or :guilabel:`Suffix` as desired.
#. In the :guilabel:`Sequence` tab, configure the sequence:
- :guilabel:`Prefix`: characters added *before* the next number in the sequence.
- :guilabel:`Suffix`: characters added *after* the next number in the sequence.
- :guilabel:`Sequence Size`: determines the number of digits in every number in the sequence. If
needed, leading zeros are added before the number to achieve the indicated sequence size, e.g.,
for a sequence size of `5`, the first number in the sequence is `00001`.
- :guilabel:`Step`: determines the increments between the numbers in the sequence.
- :guilabel:`Next Number`: the next number that will be used in the sequence, without leading
zeros.
.. tip::
Use dynamic placeholders like :guilabel:`Current Year with Century: %(year)s` in the
:guilabel:`Prefix` and/or :guilabel:`Suffix` to create sequences with elements like current
year, month, etc. Possible placeholders are shows at the bottom of the window.
- Use dynamic placeholders like `%(year)s` or `%(month)s` as a :guilabel:`Prefix` and/or
:guilabel:`Suffix` to create sequences with elements like current year, month, etc. Possible
placeholders are shown at the bottom of the window.
- To use sub-sequences, e.g., to have the sequence restart each year or each month, enable
:guilabel:`Use subsequences per date_range`, then :guilabel:`Add a line` for each date
range and indicate the :guilabel:`Next Number` for the range.
#. Click :guilabel:`Save`.
@@ -336,7 +348,9 @@ Select an existing sequence or, to create a new sequence:
customer is created, set the :guilabel:`Sequence` field to :guilabel:`Reference`, then, in the
dropdown, click :guilabel:`Search more`. Click :guilabel:`New` to create a new sequence.
In the example, each new customer receives a sequential reference with the prefix `
In the example, each new customer receives a sequential reference with the prefix
`#-REF-%(year)s-`, where `%(year)s` is the current year including the century, and the suffix
`/CL`, e.g., `#-REF-2025-00001/CL`, `#-REF-2025-00002/CL`, etc.
.. image:: automated_actions/update-record-sequence.png
:alt: Example of an Update Record action using a sequence

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -386,6 +386,9 @@ being edited. The record's name from the other model is then displayed on the re
creation`.
- To prevent users from opening records in a pop-up window, tick :guilabel:`Disable opening`.
- To help users only select the right record, click on :guilabel:`Domain` to create a filter.
- To only trigger the search for a linked record after a minimum number of characters has been
entered, enter the desired number in the :guilabel:`Typeahead search` field. In situations
where the data set is large, this can enhance both search relevancy and performance.
- :guilabel:`Badge`: displays the value inside a rounded shape, similar to a tag. The value cannot
be edited on the UI.
@@ -447,6 +450,11 @@ records on the current model. Many2Many fields can use :guilabel:`Disable creati
.. image:: fields/many2many-diagram.png
:alt: Diagram showing many2many relationships
.. tip::
To only trigger the search for the linked record after a minimum number of characters has been
entered, enter the desired number in the :guilabel:`Typeahead search` field. In situations where
the data set is large, this can enhance both search relevancy and performance.
- :guilabel:`Checkboxes`: users can select several values using checkboxes.
- :guilabel:`Tags`: users can select several values appearing in rounded shapes, also known as
*tags*. This has the same effect as selecting the :ref:`Tags field

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -53,15 +53,24 @@ contacts, sales orders, products, etc.
- :guilabel:`Call a method`: specify an existing Python method already defined in Odoo.
- To change a button's label or style, click the button and edit its :guilabel:`Label` or
:guilabel:`Class` (either `btn-primary` or `btn-secondary`) in the :guilabel:`Properties` tab.
:guilabel:`Class` (either `btn-primary` for a *primary* button or `btn-secondary` for a
*secondary* button) in the :guilabel:`Properties` tab.
.. tip::
*Primary* buttons represent the main action(s) the user can take in a specific view, e.g.,
:guilabel:`Send` a request for quotation, and are more visually prominent. *Secondary* buttons
offer alternative or less common actions, e.g., :guilabel:`Print` or :guilabel:`Preview` a
request for quotation, and are less visually prominent. By default, a new button is styled as a
secondary button.
- To add a smart button, click the :icon:`fa-plus-square` (:guilabel:`plus`) icon in the top-right
corner of the form. Enter a :guilabel:`Label`, choose an :guilabel:`Icon`, and select a
:ref:`related field <studio/fields/relational-fields-related-field>`.
.. example::
.. image:: views/form-sales-order.png
:alt: Sales order model's Form view
.. image:: views/form-new-quotation.png
:alt: Quotation Template model's Form view
.. _studio/views/general/activity:

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB