8000 [IMP] Studio: update views page · odoo/documentation@d811aef · GitHub
[go: up one dir, main page]

Skip to content

Commit d811aef

Browse files
committed
[IMP] Studio: update views page
task-3553099 closes #10449 Signed-off-by: Audrey Vandromme (auva) <auva@odoo.com>
1 parent 4f40ebd commit d811aef

14 files changed

+72
-78
lines changed

content/applications/studio/views.rst

Lines changed: 72 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,27 @@
22
Views
33
=====
44

5-
Views are the interface that allows displaying the data contained in a model. One model can have
6-
several views, which are simply different ways to show the same data. In Studio, views are organized
7-
into four categories: :ref:`general <studio/views/general>`, :ref:`multiple records
8-
<studio/views/multiple-records>`, :ref:`timeline <studio/views/timeline>`, and :ref:`reporting
9-
<studio/views/reporting>`.
5+
Views are the interface that allows displaying the data contained in a :doc:`model
6+
<models_modules_apps>`. One model can have several views, which are simply different ways to show
7+
the same data. In Studio, views are organized into four categories: :ref:`general
8+
<studio/views/general>`, :ref:`multiple records <studio/views/multiple-records>`, :ref:`timeline
9+
<studio/views/timeline>`, and :ref:`reporting <studio/views/reporting>`.
1010

1111
.. tip::
12-
To change the default view of a model, go to :menuselection:`Studio --> Views --> Dropdown menu
13-
(⋮) --> Set as Default`.
14-
15-
.. note::
16-
You can modify views by using the built-in XML editor. To do so, activate :ref:`Developer mode
17-
<developer-mode>`, go to the view you want to edit, select the :guilabel:`View` tab and then
18-
click on :guilabel:`</> XML`.
19-
20-
.. important::
21-
If you are editing a view using the XML editor, avoid making changes directly to standard
22-
views and inherited views, as those would be reset and would not be kept in case of an update
23-
or module upgrade. Always make sure you select the right Studio inherited views. Indeed, when
24-
you modify a view in Studio by drag-and-dropping a new field, a specific Studio inherited view
25-
and its XPath, the latter which defines which part of the view is modified, are automatically
26-
generated.
12+
- To change the default view of a model, :ref:`access Studio <studio/access>`, go to
13+
:guilabel:`Views`, click the :icon:`fa-ellipsis-v` (:guilabel:`ellipsis`) icon next to the
14+
desired view, and click :guilabel:`Set as Default`.
15+
- You can modify views using the built-in XML editor: Activate the :ref:`Developer mode
16+
<developer-mode>`, go to the view you want to edit, select the :guilabel:`View` tab, and
17+
click :guilabel:`</> XML`.
18+
19+
.. important::
20+
If you are editing a view using the XML editor, avoid making changes directly to standard
21+
and inherited views, as these would be reset and lost during updates or module upgrades.
22+
Always make sure you select the right Studio inherited views: When you modify a
23+
view in Studio by dragging and dropping a new field, for example, a specific Studio
24+
inherited view and its corresponding XPath, which defines the modified part of the view, are
25+
automatically generated.
2726

2827
.. _studio/views/general:
2928

@@ -39,53 +38,61 @@ General views
3938
Form
4039
----
4140

42-
The :guilabel:`Form` view is used when creating and editing records, such as contacts, sales orders,
43-
products, etc.
41+
The :guilabel:`Form` :icon:`fa-address-card` view is used when creating and editing records, such as
42+
contacts, sales orders, products, etc.
4443

45-
- To structure a form, drag-and-drop the :guilabel:`Tabs and Columns` element found under the
44+
- To structure a form, drag and drop the :guilabel:`Tabs and Columns` element found under the
4645
:guilabel:`+ Add` tab.
4746
- To prevent users from creating, editing, or deleting records, untick :guilabel:`Can Create`,
4847
:guilabel:`Can Edit`, or :guilabel:`Can Delete`.
48+
- To add a button, click :guilabel:`Add a button` at the top of the form, enter a :guilabel:`Label`,
49+
and select the button's action:
50+
51+
- :guilabel:`Run a Server Action`: select the :ref:`server action <reference/actions/server>` to
52+
be executed from the dropdown list;
53+
- :guilabel:`Call a method`: specify an existing Python method already defined in Odoo.
54+
55+
- To add a smart button, click the :icon:`fa-plus-square` (:guilabel:`plus`) icon in the top-right
56+
corner of the form. Enter a :guilabel:`Label`, choose an :guilabel:`Icon`, and select a
57+
:ref:`related field <studio/fields/relational-fields/related-field>`.
4958

5059
.. example::
5160

5261
.. image:: views/form-sales-order.png
53-
:align: center
5462
:alt: Sales order model's Form view
5563

5664
.. _studio/views/general/activity:
5765

5866
Activity
5967
--------
6068

61-
The :guilabel:`Activity` view is used to schedule and have an overview of activities (emails, calls,
62-
etc.) linked to records.
69+
The :guilabel:`Activity` :icon:`fa-clock-o` view is used to schedule and have an overview of
70+
activities (emails, calls, etc.) linked to records.
6371

6472
.. note::
6573
This view can only be modified within Studio by editing the XML code.
6674

6775
.. example::
6876

6977
.. image:: views/activity-lead-opportunity.png
70-
:align: center
7178
:alt: Lead/Opportunity model's Activity view
7279

7380
.. _studio/views/general/search:
7481

7582
Search
7683
------
7784

78-
The :guilabel:`Search` view is added on top of other views to filter, group, and search records.
85+
The :guilabel:`Search` :icon:`oi-search` view is added on top of other views to filter, group, and
86+
search records.
7987

8088
- To add custom :guilabel:`Filters` and structure them using :guilabel:`Separators`, go to the
8189
:guilabel:`+ Add` tab and drag and drop them under :guilabel:`Filters`.
8290
- To add an existing field under the search dropdown menu, go to the :guilabel:`+ Add` tab and
83-
drag-and-drop it under :guilabel:`Autocompletion Fields`.
91+
drag and drop it under :guilabel:`Autocompletion Fields`.
8492

8593
.. example::
8694

8795
.. image:: views/search-project-kanban.png
88-
:align: center
8996
:alt: Project model's Search view on the Kanban view
9097

9198
.. _studio/views/multiple-records:
@@ -102,8 +109,8 @@ Multiple records views
102109
Kanban
103110
------
104111

105-
The :guilabel:`Kanban` view is often used to support business flows by moving records across stages
106-
or as an alternative way to display records inside *cards*.
112+
The :guilabel:`Kanban` :icon:`oi-view-kanban` view is often used to support business flows by moving
113+
records across stages or as an alternative way to display records inside *cards*.
107114

108115
.. note::
109116
If the :guilabel:`Kanban` view exists, it is used by default to display data on mobile devices
@@ -112,64 +119,68 @@ or as an alternative way to display records inside *cards*.
112119
- To prevent users from creating new records, untick :guilabel:`Can Create`.
113120
- To create records directly within the view, in a minimalistic form, enable :guilabel:`Quick
114121
Create`.
115-
- To change the way records are grouped by default, select a new group under :guilabel:`Default
116-
Group by`.
122+
- To set a default grouping for records, select a field under :guilabel:`Default Group By`.
117123

118124
.. example::
119125

120126
.. image:: views/kanban-project.png
121-
:align: center
122127
:alt: Project model's Kanban view
123128

124129
.. _studio/views/multiple-records/list:
125130

126131
List
127132
----
128133

129-
The :guilabel:`List` view is used to overview many records at once, look for records, and edit
130-
simple records.
134+
The :guilabel:`List` :icon:`oi-view-list` view is used to overview many records at once, look for
135+
records, and edit simple records.
131136

132137
- To prevent users from creating, editing, or deleting records, untick :guilabel:`Can Create`,
133138
:guilabel:`Can Edit`, or :guilabel:`Can Delete`.
134-
- To create and edit records directly within the view, select either :guilabel:`New record on top`
135-
or :guilabel:`New record at the bottom` under :guilabel:`Editable`.
139+
- To create and edit records directly within the view, select either :guilabel:`Add record at the
140+
bottom`, :guilabel:`Add record on top` or :guilabel:`Open form view` under
141+
:guilabel:`When Creating Record`.
136142

137143
.. note::
138144
This prevents users from opening records in :ref:`Form view <studio/views/general/form>` from the
139145
:guilabel:`List` view.
140146

141147
- To edit several records at once, tick :guilabel:`Enable Mass Editing`.
142148
- To change the way records are sorted by default, select a field under :guilabel:`Sort By`.
149+
- To set a default grouping for records, select a field under :guilabel:`Default Group By`.
150+
- To add a button, click :guilabel:`Add a button` at the top of the list, enter a :guilabel:`Label`,
151+
and select the button's action:
152+
153+
- :guilabel:`Run a Server Action`: select the :ref:`server action <reference/actions/server>` to
154+
be executed from the dropdown list;
155+
- :guilabel:`Call a method`: specify an existing Python method already defined in Odoo.
143156

144157
.. tip::
145-
To add a drag handle icon to reorder records manually, add an :ref:`Integer field
146-
<studio/fields/simple-fields/integer>` with the :guilabel:`Handle` widget.
158+
To add a :icon:`oi-draggable` (:guilabel:`drag handle`) icon to reorder records manually, add an
159+
:ref:`Integer field <studio/fields/simple-fields/integer>` with the :guilabel:`Handle` widget.
147160

148161
.. image:: views/list-drag-handle.png
149-
:align: center
150162
:alt: Drag handle icon enabling to sort records manually in List view
151163

152164
.. example::
153165

154166
.. image:: views/list-sales-order.png
155-
:align: center
156167
:alt: Sales order model's List view
157168

158169
.. _studio/views/multiple-records/map:
159170

160171
Map
161172
---
162173

163-
The :guilabel:`Map` view is used to display records on a map. For example, it is used in the Field
164-
Service app to plan an itinerary between different tasks.
174+
The :guilabel:`Map` :icon:`fa-map-marker` view is used to display records on a map. For example, it
175+
is used in the Field Service app to plan an itinerary between different tasks.
165176

166177
.. note::
167178
A :ref:`Many2One field <studio/fields/relational-fields/many2one>` linked to the *Contact* model
168179
is required to activate the view, as the contact address is used to position records on the map.
169180

170181
- To select which kind of contact should be used on the map, select it under :guilabel:`Contact
171182
Field`.
172-
- To hide the name or the address of the record, tick :guilabel:`Hide name` or :guilabel:`Hide
183+
- To hide the name or the address of the record, tick :guilabel:`Hide Name` or :guilabel:`Hide
173184
Address`.
174185
- To add information from other fields, select them under :guilabel:`Additional Fields`.
175186
- To have a route suggested between the different records, tick :guilabel:`Enable Routing` and
@@ -178,7 +189,6 @@ Service app to plan an itinerary between different tasks.
178189
.. example::
179190

180191
.. image:: views/map-task.png
181-
:align: center
182192
:alt: Task model's Map view
183193

184194
.. _studio/views/timeline:
@@ -200,7 +210,8 @@ Timeline views
200210
Calendar
201211
--------
202212

203-
The :guilabel:`Calendar` view is used to overview and manage records inside a calendar.
213+
The :guilabel:`Calendar` :icon:`fa-calendar` view is used to overview and manage records inside a
214+
calendar.
204215

205216
- To create records directly within the view instead of opening the :ref:`Form view
206217
<studio/views/general/form>`, enable :guilabel:`Quick Create`.
@@ -224,7 +235,7 @@ The :guilabel:`Calendar` view is used to overview and manage records inside a ca
224235
:guilabel:`Month`, or :guilabel:`Year` under :guilabel:`Default Display Mode`.
225236

226237
.. note::
227-
You can also use :guilabel:`Delay Field` to display the duration of the event in hours by
238+
You can also use a :guilabel:`Delay Field` to display the duration of the event in hours by
228239
selecting a :ref:`Decimal <studio/fields/simple-fields/decimal>` or :ref:`Integer
229240
<studio/fields/simple-fields/integer>` field on the model which specifies the duration of the
230241
event. However, if you set an :guilabel:`End Date Field`, the :guilabel:`Delay Field` will not be
@@ -233,16 +244,16 @@ The :guilabel:`Calendar` view is used to overview and manage records inside a ca
233244
.. example::
234245

235246
.. image:: views/calendar-event.png
236-
:align: center
237247
:alt: Calendar Event model's Calendar view
238248

239249
.. _studio/views/timeline/cohort:
240250

241251
Cohort
242252
------
243253

244-
The :guilabel:`Cohort` view is used to examine the life cycle of records over a time period. For
245-
example, it is used in the Subscriptions app to view the subscriptions' retention rate.
254+
The :guilabel:`Cohort` :icon:`oi-view-cohort` view is used to examine the life cycle of records over
255+
a time period. For example, it is used in the Subscriptions app to view the subscriptions' retention
256+
rate.
246257

247258
- To display a measure (i.e., the aggregated value of a given field) by default on the view, select
248259
a :guilabel:`Measure Field`.
@@ -259,16 +270,15 @@ example, it is used in the Subscriptions app to view the subscriptions' retentio
259270
.. example::
260271

261272
.. image:: views/cohort-subscription.png
262-
:align: center
263273
:alt: Subscription model's Cohort view
264274

265275
.. _studio/views/timeline/gantt:
266276

267277
Gantt
268278
-----
269279

270-
The :guilabel:`Gantt` view is used to forecast and examine the overall progress of records. Records
271-
are represented by a bar under a time scale.
280+
The :guilabel:`Gantt` :icon:`fa-tasks` view is used to forecast and examine the overall progress of
281+
records. Records are represented by a bar under a time scale.
272282

273283
- To prevent users from creating or editing records, untick :guilabel:`Can Create` or :guilabel:`Can
274284
Edit`.
@@ -299,7 +309,6 @@ are represented by a bar under a time scale.
299309
.. example::
300310

301311
.. image:: views/gantt-planning.png
302-
:align: center
303312
:alt: Planning Shift model's Gantt view
304313

305314
.. _studio/views/reporting:
@@ -316,9 +325,9 @@ Reporting views
316325
Pivot
317326
-----
318327

319-
The :guilabel:`Pivot` view is used to explore and analyze the data contained in records in an
320-
interactive manner. It is especially useful to aggregate numeric data, create categories, and drill
321-
down the data by expanding and collapsing different levels of data.
328+
The :guilabel:`Pivot` :icon:`oi-view-pivot` view is used to explore and analyze the data contained
329+
in records in an interactive manner. It is especially useful to aggregate numeric data, create
330+
categories, and drill down the data by expanding and collapsing different levels of data.
322331

323332
- To access all records whose data is aggregated under a cell, tick :guilabel:`Access records from
324333
cell`.
@@ -332,15 +341,15 @@ down the data by expanding and collapsing different levels of data.
332341
.. example::
333342

334343
.. image:: views/pivot-purchase-report.png
335-
:align: center
336344
:alt: Purchase Report model's Pivot view
337345

338346
.. _studio/views/reporting/graph:
339347

340348
Graph
341349
-----
342350

343-
The :guilabel:`Graph` view is used to showcase data from records in a bar, line, or pie chart.
351+
The :guilabel:`Graph` :icon:`fa-area-chart` view is used to showcase data from records in a bar,
352+
line, or pie chart.
344353

345354
- To change the default chart, select :guilabel:`Bar`, :guilabel:`Line`, or :guilabel:`Pie` under
346355
:guilabel:`Type`.
@@ -359,20 +368,5 @@ The :guilabel:`Graph` view is used to showcase data from records in a bar, line,
359368
.. example::
360369

361370
.. image:: views/graph-sales-report.png
362-
:align: center
363-
:alt: Sales Analysis Report model's Bar chart on Graph view
364-
365-
.. _studio/views/reporting/dashboard:
366-
367-
Dashboard
368-
---------
369-
370-
The :guilabel:`Dashboard` view is used to display multiple reporting views and key performance
371-
indicators. Which elements are displayed on the view depends on the configuration of the other
372-
reporting views.
373-
374-
.. example::
375-
376-
.. image:: views/dashboard-sales-report.png
377-
:align: center
378-
:alt: Sales Analysis Report model's Dashboard view
371+
:alt: Sales Analysis Report model's Bar chart on Graph view
372+
:scale: 75%
Loading
Loading
Loading
Binary file not shown.
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)
0