2
2
Views
3
3
=====
4
4
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 >`.
10
10
11
11
.. 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.
27
26
28
27
.. _studio/views/general :
29
28
@@ -39,53 +38,61 @@ General views
39
38
Form
40
39
----
41
40
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.
44
43
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
46
45
:guilabel: `+ Add ` tab.
47
46
- To prevent users from creating, editing, or deleting records, untick :guilabel: `Can Create `,
48
47
: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 >`.
49
58
50
59
.. example ::
51
60
52
61
.. image :: views/form-sales-order.png
53
- :align: center
54
62
:alt: Sales order model's Form view
55
63
56
64
.. _studio/views/general/activity :
57
65
58
66
Activity
59
67
--------
60
68
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.
63
71
64
72
.. note ::
65
73
This view can only be modified within Studio by editing the XML code.
66
74
67
75
.. example ::
68
76
69
77
.. image :: views/activity-lead-opportunity.png
70
- :align: center
71
78
:alt: Lead/Opportunity model's Activity view
72
79
73
80
.. _studio/views/general/search :
74
81
75
82
Search
76
83
------
77
84
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.
79
87
80
88
- To add custom :guilabel: `Filters ` and structure them using :guilabel: `Separators `, go to the
81
89
:guilabel: `+ Add ` tab and drag and drop them under :guilabel: `Filters `.
82
90
- 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 `.
84
92
85
93
.. example ::
86
94
87
95
.. image :: views/search-project-kanban.png
88
- :align: center
89
96
:alt: Project model's Search view on the Kanban view
90
97
91
98
.. _studio/views/multiple-records :
@@ -102,8 +109,8 @@ Multiple records views
102
109
Kanban
103
110
------
104
111
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 *.
107
114
108
115
.. note ::
109
116
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*.
112
119
- To prevent users from creating new records, untick :guilabel: `Can Create `.
113
120
- To create records directly within the view, in a minimalistic form, enable :guilabel: `Quick
114
121
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 `.
117
123
118
124
.. example ::
119
125
120
126
.. image :: views/kanban-project.png
121
- :align: center
122
127
:alt: Project model's Kanban view
123
128
124
129
.. _studio/views/multiple-records/list :
125
130
126
131
List
127
132
----
128
133
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.
131
136
132
137
- To prevent users from creating, editing, or deleting records, untick :guilabel: `Can Create `,
133
138
: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 `.
136
142
137
143
.. note ::
138
144
This prevents users from opening records in :ref: `Form view <studio/views/general/form >` from the
139
145
:guilabel: `List ` view.
140
146
141
147
- To edit several records at once, tick :guilabel: `Enable Mass Editing `.
142
148
- 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.
143
156
144
157
.. 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.
147
160
148
161
.. image :: views/list-drag-handle.png
149
- :align: center
150
162
:alt: Drag handle icon enabling to sort records manually in List view
151
163
152
164
.. example ::
153
165
154
166
.. image :: views/list-sales-order.png
155
- :align: center
156
167
:alt: Sales order model's List view
157
168
158
169
.. _studio/views/multiple-records/map :
159
170
160
171
Map
161
172
---
162
173
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.
165
176
166
177
.. note ::
167
178
A :ref: `Many2One field <studio/fields/relational-fields/many2one >` linked to the *Contact * model
168
179
is required to activate the view, as the contact address is used to position records on the map.
169
180
170
181
- To select which kind of contact should be used on the map, select it under :guilabel: `Contact
171
182
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
173
184
Address `.
174
185
- To add information from other fields, select them under :guilabel: `Additional Fields `.
175
186
- 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.
178
189
.. example ::
179
190
180
191
.. image :: views/map-task.png
181
- :align: center
182
192
:alt: Task model's Map view
183
193
184
194
.. _studio/views/timeline :
@@ -200,7 +210,8 @@ Timeline views
200
210
Calendar
201
211
--------
202
212
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.
204
215
205
216
- To create records directly within the view instead of opening the :ref: `Form view
206
217
<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
224
235
:guilabel: `Month `, or :guilabel: `Year ` under :guilabel: `Default Display Mode `.
225
236
226
237
.. 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
228
239
selecting a :ref: `Decimal <studio/fields/simple-fields/decimal >` or :ref: `Integer
229
240
<studio/fields/simple-fields/integer>` field on the model which specifies the duration of the
230
241
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
233
244
.. example ::
234
245
235
246
.. image :: views/calendar-event.png
236
- :align: center
237
247
:alt: Calendar Event model's Calendar view
238
248
239
249
.. _studio/views/timeline/cohort :
240
250
241
251
Cohort
242
252
------
243
253
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.
246
257
247
258
- To display a measure (i.e., the aggregated value of a given field) by default on the view, select
248
259
a :guilabel: `Measure Field `.
@@ -259,16 +270,15 @@ example, it is used in the Subscriptions app to view the subscriptions' retentio
259
270
.. example ::
260
271
261
272
.. image :: views/cohort-subscription.png
262
- :align: center
263
273
:alt: Subscription model's Cohort view
264
274
265
275
.. _studio/views/timeline/gantt :
266
276
267
277
Gantt
268
278
-----
269
279
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.
272
282
273
283
- To prevent users from creating or editing records, untick :guilabel: `Can Create ` or :guilabel: `Can
274
284
Edit `.
@@ -299,7 +309,6 @@ are represented by a bar under a time scale.
299
309
.. example ::
300
310
301
311
.. image :: views/gantt-planning.png
302
- :align: center
303
312
:alt: Planning Shift model's Gantt view
304
313
305
314
.. _studio/views/reporting :
@@ -316,9 +325,9 @@ Reporting views
316
325
Pivot
317
326
-----
318
327
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.
322
331
323
332
- To access all records whose data is aggregated under a cell, tick :guilabel: `Access records from
324
333
cell `.
@@ -332,15 +341,15 @@ down the data by expanding and collapsing different levels of data.
332
341
.. example ::
333
342
334
343
.. image :: views/pivot-purchase-report.png
335
- :align: center
336
344
:alt: Purchase Report model's Pivot view
337
345
338
346
.. _studio/views/reporting/graph :
339
347
340
348
Graph
341
349
-----
342
350
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.
344
353
345
354
- To change the default chart, select :guilabel: `Bar `, :guilabel: `Line `, or :guilabel: `Pie ` under
346
355
:guilabel: `Type `.
@@ -359,20 +368,5 @@ The :guilabel:`Graph` view is used to showcase data from records in a bar, line,
359
368
.. example ::
360
369
361
370
.. 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%
0 commit comments