Skip to content

Commit c50a06f

Browse files
committed
[IMP] studio: typeahead search, primary vs secondary buttons, sequence
task-5190016 closes #15097 X-original-commit: 7209c48 Signed-off-by: Audrey Vandromme (auva) <[email protected]> Signed-off-by: Siobhan McGonigle (mcsi) <[email protected]>
1 parent 1860a02 commit c50a06f

File tree

7 files changed

+39
-8
lines changed

7 files changed

+39
-8
lines changed

content/applications/studio/automated_actions.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,24 @@ Select an existing sequence or, to create a new sequence:
322322

323323
#. Click :guilabel:`Search more`, then click :guilabel:`New`.
324324
#. In the window that opens, enter the :guilabel:`Name` of the sequence.
325-
#. Configure the sequence, adding a :guilabel:`Prefix` and/or :guilabel:`Suffix` as desired.
325+
#. In the :guilabel:`Sequence` tab, configure the sequence:
326+
327+
- :guilabel:`Prefix`: characters added *before* the next number in the sequence.
328+
- :guilabel:`Suffix`: characters added *after* the next number in the sequence.
329+
- :guilabel:`Sequence Size`: determines the number of digits in every number in the sequence. If
330+
needed, leading zeros are added before the number to achieve the indicated sequence size, e.g.,
331+
for a sequence size of `5`, the first number in the sequence is `00001`.
332+
- :guilabel:`Step`: determines the increments between the numbers in the sequence.
333+
- :guilabel:`Next Number`: the next number that will be used in the sequence, without leading
334+
zeros.
326335

327336
.. tip::
328-
Use dynamic placeholders like :guilabel:`Current Year with Century: %(year)s` in the
329-
:guilabel:`Prefix` and/or :guilabel:`Suffix` to create sequences with elements like current
330-
year, month, etc. Possible placeholders are shows at the bottom of the window.
337+
- Use dynamic placeholders like `%(year)s` or `%(month)s` as a :guilabel:`Prefix` and/or
338+
:guilabel:`Suffix` to create sequences with elements like current year, month, etc. Possible
339+
placeholders are shown at the bottom of the window.
340+
- To use sub-sequences, e.g., to have the sequence restart each year or each month, enable
341+
:guilabel:`Use subsequences per date_range`, then :guilabel:`Add a line` for each date
342+
range and indicate the :guilabel:`Next Number` for the range.
331343

332344
#. Click :guilabel:`Save`.
333345

@@ -336,7 +348,9 @@ Select an existing sequence or, to create a new sequence:
336348
customer is created, set the :guilabel:`Sequence` field to :guilabel:`Reference`, then, in the
337349
dropdown, click :guilabel:`Search more`. Click :guilabel:`New` to create a new sequence.
338350

339-
In the example, each new customer receives a sequential reference with the prefix `
351+
In the example, each new customer receives a sequential reference with the prefix
352+
`#-REF-%(year)s-`, where `%(year)s` is the current year including the century, and the suffix
353+
`/CL`, e.g., `#-REF-2025-00001/CL`, `#-REF-2025-00002/CL`, etc.
340354

341355
.. image:: automated_actions/update-record-sequence.png
342356
:alt: Example of an Update Record action using a sequence
1.22 KB
Loading

content/applications/studio/fields.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ being edited. The record's name from the other model is then displayed on the re
386386
creation`.
387387
- To prevent users from opening records in a pop-up window, tick :guilabel:`Disable opening`.
388388
- To help users only select the right record, click on :guilabel:`Domain` to create a filter.
389+
- To only trigger the search for a linked record after a minimum number of characters has been
390+
entered, enter the desired number in the :guilabel:`Typeahead search` field. In situations
391+
where the data set is large, this can enhance both search relevancy and performance.
389392

390393
- :guilabel:`Badge`: displays the value inside a rounded shape, similar to a tag. The value cannot
391394
be edited on the UI.
@@ -447,6 +450,11 @@ records on the current model. Many2Many fields can use :guilabel:`Disable creati
447450
.. image:: fields/many2many-diagram.png
448451
:alt: Diagram showing many2many relationships
449452

453+
.. tip::
454+
To only trigger the search for the linked record after a minimum number of characters has been
455+
entered, enter the desired number in the :guilabel:`Typeahead search` field. In situations where
456+
the data set is large, this can enhance both search relevancy and performance.
457+
450458
- :guilabel:`Checkboxes`: users can select several values using checkboxes.
451459
- :guilabel:`Tags`: users can select several values appearing in rounded shapes, also known as
452460
*tags*. This has the same effect as selecting the :ref:`Tags field
4.11 KB
Loading

content/applications/studio/views.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,24 @@ contacts, sales orders, products, etc.
5353
- :guilabel:`Call a method`: specify an existing Python method already defined in Odoo.
5454

5555
- To change a button's label or style, click the button and edit its :guilabel:`Label` or
56-
:guilabel:`Class` (either `btn-primary` or `btn-secondary`) in the :guilabel:`Properties` tab.
56+
:guilabel:`Class` (either `btn-primary` for a *primary* button or `btn-secondary` for a
57+
*secondary* button) in the :guilabel:`Properties` tab.
58+
59+
.. tip::
60+
*Primary* buttons represent the main action(s) the user can take in a specific view, e.g.,
61+
:guilabel:`Send` a request for quotation, and are more visually prominent. *Secondary* buttons
62+
offer alternative or less common actions, e.g., :guilabel:`Print` or :guilabel:`Preview` a
63+
request for quotation, and are less visually prominent. By default, a new button is styled as a
64+
secondary button.
65+
5766
- To add a smart button, click the :icon:`fa-plus-square` (:guilabel:`plus`) icon in the top-right
5867
corner of the form. Enter a :guilabel:`Label`, choose an :guilabel:`Icon`, and select a
5968
:ref:`related field <studio/fields/relational-fields-related-field>`.
6069

6170
.. example::
6271

63-
.. image:: views/form-sales-order.png
64-
:alt: Sales order model's Form view
72+
.. image:: views/form-new-quotation.png
73+
:alt: Quotation Template model's Form view
6574

6675
.. _studio/views/general/activity:
6776

23.6 KB
Loading
-19.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)