@@ -10,14 +10,13 @@ These filters are particularly useful for reports and dashboards as users can ea
10
10
customize the view to answer complex business questions spanning multiple data sources.
11
11
12
12
.. tip ::
13
- When a spreadsheet with global filters is added to a dashboard, the filters appear as dropdown
14
- menus at the top of the dashboard. In a spreadsheet, they appear in a pane to the right of the
15
- spreadsheet.
13
+ On a dashboard, global filters that have been :ref: `created in the underlying spreadsheet
14
+ <spreadsheet/global-filters/create>` are applied via the search bar at the top of the dashboard.
16
15
17
16
.. image :: global_filters/dashboard-global-filters.png
18
17
:alt: Global filters at the top of a dashboard
19
18
20
- Three types of global filters are available:
19
+ Four types of global filters are available:
21
20
22
21
- :ref: `Date <spreadsheet/global-filters/create-date >`: filters data based on a specific time range,
23
22
with the options :guilabel: `Month / Quarter `, :guilabel: `Relative Period `, or :guilabel: `From /
@@ -27,6 +26,8 @@ Three types of global filters are available:
27
26
related model.
28
27
- :ref: `Text <spreadsheet/global-filters/create-text >`: filters data based on a string of text or a
29
28
range of predefined values, e.g., a product reference or barcode.
29
+ - :ref: `Yes/No <spreadsheet/global-filters/create-checkbox >`: filters data based on whether or not a
30
+ checkbox, or boolean, field is set, e.g., lead is active.
30
31
31
32
Unlike the standard :icon: `fa-filter ` :guilabel: `(Add filters) ` spreadsheet function, which lets you
32
33
sort and temporarily hide data, global filters act on the underlying :ref: `data sources
@@ -65,8 +66,9 @@ filter should act on, or match with.
65
66
66
67
Field matching is further explained in the relevant sections on creating
67
68
:ref: `Date <spreadsheet/global-filters/create-date >`,
68
- :ref: `Relation <spreadsheet/global-filters/create-relation >`, and
69
- :ref: `Text <spreadsheet/global-filters/create-text >` global filters.
69
+ :ref: `Relation <spreadsheet/global-filters/create-relation >`,
70
+ :ref: `Text <spreadsheet/global-filters/create-text >`, and
71
+ :ref: `Yes/No <spreadsheet/global-filters/create-checkbox >` global filters.
70
72
71
73
.. _spreadsheet/global-filters/create :
72
74
@@ -76,19 +78,27 @@ Create global filters
76
78
Open the desired spreadsheet from the **Odoo Documents ** app or via the **Odoo Dashboards ** app if
77
79
you are adding filters to a dashboard.
78
80
79
- .. tip ::
80
- To access the underlying spreadsheet of a dashboard, with the ** Dashboards ** app open,
81
- :ref: ` activate developer mode < developer-mode >`, then click the :icon: `fa-pencil `
82
- :guilabel: `(Edit) ` icon that appears when hovering over the dashboard name .
81
+ To add a new filter, click :icon: ` os-global-filters ` :guilabel: ` Filters ` to open the
82
+ :guilabel: ` Filters ` panel. Under :guilabel: ` Create filter `, click :icon: ` fa-calendar `
83
+ :guilabel: ` Date `, :icon: ` fa-link ` :guilabel: ` Relation `, :icon: `fa-font ` :guilabel: ` Text `, or
84
+ :icon: ` fa-toggle-off ` :guilabel: `Yes/No ` as appropriate .
83
85
84
- To add a new filter, click :icon: `os-global-filters ` :guilabel: `Filters `, then, under :guilabel: `Add
85
- a new filter... ` click :guilabel: `Date `, :guilabel: `Relation `, or :guilabel: `Text ` as appropriate.
86
- The :guilabel: `Filter properties ` pane opens.
86
+ .. note ::
87
+ Depending on the data source(s) present in the spreadsheet, suggested :ref: `relation filters
88
+ <spreadsheet/global-filters/create-relation>` may be shown. Clicking on a suggested filter opens
89
+ the :guilabel: `Filter properties ` panel with certain values preconfigured.
87
90
88
91
When saving a global filter, if any required information is missing or if any information provided
89
92
in the :ref: `Field matching <spreadsheet/global-filters/field-matching >` section is not appropriate,
90
93
an error is shown stating :guilabel: `Some required fields are not valid `.
91
94
95
+ .. tip ::
96
+ - To access the underlying spreadsheet of a dashboard, :ref: `activate developer mode
97
+ <developer-mode>`, then click the :icon: `fa-pencil ` :guilabel: `(Edit) ` icon that appears when
98
+ hovering over the dashboard name in the left panel.
99
+ - Click :icon: `fa-thumb-tack ` :guilabel: `(pin) ` at the top of the :guilabel: `Filters ` panel to
100
+ allow another panel, such as the :guilabel: `Filter properties ` panel, to open beside it.
101
+
92
102
.. _spreadsheet/global-filters/create-date :
93
103
94
104
Date
@@ -98,35 +108,18 @@ Date
98
108
A :guilabel: `Date ` filter can only match with a :ref: `Date <studio/fields/simple-fields-date >`
99
109
or :ref: `Date & Time <studio/fields/simple-fields-date-time >` field.
100
110
101
- With the :guilabel: `Filter properties ` pane open:
111
+ With the :guilabel: `Filter properties ` panel open:
102
112
103
113
#. Enter a name for the new date filter in the :guilabel: `Label ` field.
104
- #. From the :guilabel: `Time range ` dropdown menu, select one of the following:
105
-
106
- - :guilabel: `Month / Quarter `: enables a dropdown menu of specific months and/or quarters and a
107
- year selector for the year. The values :guilabel: `Months ` and :guilabel: `Quarters ` are enabled
108
- by default. Disabling both of these values allows filtering by year only.
109
-
110
- To set a :guilabel: `Default value `, enable
111
- :guilabel: `Automatically filter on the current period ` and choose whether to filter on the
112
- current :guilabel: `Month `, :guilabel: `Quarter ` or :guilabel: `Year `.
113
-
114
- - :guilabel: `Relative Period `: enables a dropdown menu of specific time ranges relative to the
115
- current date (e.g., :guilabel: `Year to Date `, :guilabel: `Last 7 Days `,
116
- :guilabel: `Last 30 Days `, etc.).
117
-
118
- To set a :guilabel: `Default value `, select one of the available values.
119
-
120
- - :guilabel: `From / To `: enables :guilabel: `Date from... ` and :guilabel: `Date to... ` date
121
- selection fields to define a specific time range (e.g., `06/05/2024 ` to `06/27/2024 `).
122
-
114
+ #. To set a :guilabel: `Default value `, select one of the available values, e.g, `Last 30 Days ` or
115
+ `Month to Date `. When applying the global filter, any of the available values can be selected.
123
116
#. In the :guilabel: `Field matching ` section, for each data source, click beside :guilabel: `Date
124
117
field ` and select the field the filter should match with.
125
118
126
119
The :guilabel: `Period offset ` option, which appears when a date field is chosen, enables
127
120
comparisons to be made by shifting the time range by one or more periods in the past or future.
128
121
By default, no period offset is defined. To define a period offset, select :guilabel: `Previous `
129
- or :guilabel: `Next `, then select the desired number of periods in the past of future.
122
+ or :guilabel: `Next `, then select the desired number of periods in the past or future.
130
123
131
124
.. tip ::
132
125
@@ -142,20 +135,19 @@ With the :guilabel:`Filter properties` pane open:
142
135
#. Click :guilabel: `Save `.
143
136
144
137
.. example ::
145
- In the example below, a :guilabel: `Date ` global filter has been created to allow the pivot table
146
- and chart to show sales data per quarter. If only a year is selected, data is shown for the
147
- entire year.
138
+ In the example below, a :guilabel: `Date ` global filter allows the pivot table and chart to show
139
+ sales data for any defined time period, in this case, `July 2025 `. The :guilabel: `Custom Range `
140
+ always shows the actual dates corresponding to the chosen period; it can also be updated
141
+ directly.
148
142
149
143
.. image :: global_filters/example-date.png
150
- :alt: A date filter to filter on quarter and year
144
+ :alt: A date filter filters data for July 2025
151
145
152
146
In the :guilabel: `Field matching ` section of the :guilabel: `Filter properties `, the field
153
- :guilabel: `Order Date ` has been selected as the matching date field. A matching date field is not
154
- needed for *List #1 * as we will not use this filter on the data source in question.
147
+ :guilabel: `Order Date ` has been selected as the matching date field.
155
148
156
149
.. image :: global_filters/field-matching-date.png
157
150
:alt: A date filter with the Order Date selected as the matching field
158
- :scale: 80%
159
151
160
152
.. _spreadsheet/global-filters/create-relation :
161
153
@@ -168,7 +160,7 @@ Relation
168
160
<studio/fields/relational-fields-one2many>`, or :ref: `Many2Many
169
161
<studio/fields/relational-fields-many2many>` field.
170
162
171
- With the :guilabel: `Filter properties ` pane open:
163
+ With the :guilabel: `Filter properties ` panel open:
172
164
173
165
#. Enter a name for the new relation filter in the :guilabel: `Label ` field.
174
166
@@ -191,66 +183,92 @@ With the :guilabel:`Filter properties` pane open:
191
183
#. Click :guilabel: `Save `.
192
184
193
185
.. example ::
194
- In the example below, a :guilabel: `Relation ` filter has been created to allow the pivot table
195
- and chart to show sales data related to selected salespeople only. The *User * model was set as
196
- the :guilabel: `Related model `.
186
+ In the example below, a :guilabel: `Relation ` filter allows the pivot table and chart to show
187
+ sales data related to selected salespeople only. The *User * model is set as the
188
+ :guilabel: `Related model `.
197
189
198
190
.. image :: global_filters/example-relation.png
199
191
:alt: Relation filter set on a pivot table
200
192
201
193
In the :guilabel: `Field matching ` section of the :guilabel: `Filter properties `, the field
202
194
:guilabel: `Salesperson ` was automatically assigned as the matching field for both the pivot table
203
- and the chart. A matching field is not needed for *List #1 * as we will not use this filter on the
204
- data source in question.
195
+ and the chart.
205
196
206
197
.. image :: global_filters/field-matching-relation.png
207
198
:alt: A relation filter with the User model configured
208
- :scale: 80%
209
199
210
200
.. _spreadsheet/global-filters/create-text :
211
201
212
202
Text
213
203
----
214
204
215
205
.. note ::
216
- A :guilabel: `Text ` filter can only match with a :ref: `Text (char)
217
- <studio/fields/simple-fields-text>`, :ref: `Integer <studio/fields/simple-fields-integer >` or
218
- :ref: `Decimal (float) <studio/fields/simple-fields-decimal >` field.
206
+ A :guilabel: `Text ` filter can only match with a :ref: `Text
207
+ <studio/fields/simple-fields-text>` (char) , :ref: `Integer <studio/fields/simple-fields-integer >`,
208
+ or :ref: `Decimal <studio/fields/simple-fields-decimal >` (float) field.
219
209
220
- With the :guilabel: `Filter properties ` pane open:
210
+ With the :guilabel: `Filter properties ` panel open:
221
211
222
212
#. Enter a name for the new text filter in the :guilabel: `Label ` field.
223
213
#. Optionally, enable :guilabel: `Restrict values to a range `. Doing so allows you to input a
224
- spreadsheet range either by typing the range or selecting it from within the spreadsheet.
214
+ spreadsheet range either by typing the range or selecting it from the relevant sheet. The
215
+ referenced range must be in the same spreadsheet.
225
216
#. Optionally, enter a :guilabel: `Default value `.
226
217
#. In the :guilabel: `Field matching ` section, for each data source click below the data source name
227
218
and select the field the :guilabel: `Text ` filter should match with.
228
219
229
220
#. Click :guilabel: `Save `.
230
221
231
222
.. example ::
232
- In the example below, a :guilabel: `Text ` global filter was created to allow the user to select a
233
- product from the :guilabel: ` Product ` filter and have both the pivot table and chart only show
234
- sales data related to that specific product .
223
+ In the example below, a :guilabel: `Text ` global filter allows the pivot table and chart to show
224
+ sales data only for products whose internal reference matches or contains the entered value, in
225
+ this case, ` FURN `. Multiple values can be entered if desired .
235
226
236
227
.. image :: global_filters/example-text.png
237
228
:alt: Global filters set on a pivot table
238
229
239
- In the :guilabel: `Filter properties `, the :guilabel: `Possible values ` of the filter were
240
- restricted to the range :guilabel: `'Products (List #1)'!A2:A34 `. This corresponds to the range
241
- containing the :guilabel: ` Display name ` of the product on a list inserted in the spreadsheet .
230
+ In the :guilabel: `Field matching ` section of the :guilabel: `Filter properties `, the
231
+ :guilabel: ` Internal Reference ` of the :guilabel: `Product Variant ` was selected as the matching
232
+ field for both the pivot table and the chart .
242
233
243
234
.. image :: global_filters/field-matching-text.png
244
- :alt: A text filter with a restricted range
245
- :scale: 80%
235
+ :alt: A text filter matched to the product's internal reference
236
+
237
+ .. tip ::
238
+ If you selected :guilabel: `Restrict values to range ` when configuring the text filter and
239
+ defined a range, you select the value of the text field from a dropdown.
240
+
241
+ .. _spreadsheet/global-filters/create-checkbox :
242
+
243
+ Yes/No
244
+ ------
245
+
246
+ .. note ::
247
+ A :guilabel: `Yes/No ` filter can only match with a :ref: `Checkbox
248
+ <studio/fields/simple-fields-checkbox>` (boolean) field.
249
+
250
+ With the :guilabel: `Filter properties ` pane open:
246
251
247
- With this configuration, the pivot table and chart can be filtered by product name by
248
- selecting one of the predefined values available in the text filter. In this case,
249
- :guilabel: `Furniture ` has already been selected as the :guilabel: `Product category `, meaning
250
- that only products of this category can be selected as possible values.
252
+ #. Enter a name for the new :guilabel: `Yes/No ` filter in the :guilabel: `Label ` field.
253
+ #. Optionally, select :guilabel: `Is set ` or :guilabel: `Is not set ` as the :guilabel: `Default value `.
254
+ #. In the :guilabel: `Field matching ` section, for each data source, click below the data source name
255
+ and select the field the :guilabel: `Yes/No ` filter should match with.
256
+ #. Click :guilabel: `Save `.
257
+
258
+ .. example ::
259
+ In the example below, a :guilabel: `Yes/No ` global filter was created to allow the user to see
260
+ all active opportunities, i.e., for which the :guilabel: `Active ` checkbox is enabled on the
261
+ record, or all inactive opportunities, i.e., for which the :guilabel: `Active ` checkbox is
262
+ disabled. Leaving the filter empty shows both active and inactive opportunities.
263
+
264
+ .. image :: global_filters/example-boolean.png
265
+ :alt: Global filters set on a pivot table
266
+
267
+ In the :guilabel: `Field matching ` section of the :guilabel: `Filter properties `, the field
268
+ :guilabel: `Active ` was assigned as the matching field for the pivot table.
251
269
252
- Furthermore, if the values in the range have been retrieved dynamically from the database, as in
253
- this case, the text filter is also dynamic, i.e., will reflect changes made to those values.
270
+ .. image :: global_filters/field-matching-checkbox.png
271
+ :alt: A yes/no filter with the Active field set as matching field
254
272
255
273
Manage and use global filters
256
274
=============================
@@ -265,8 +283,8 @@ It is possible to:
265
283
.. tip ::
266
284
Reloading the browser will cause any global filters to reset to their initial state or default
267
285
value, as relevant. To refresh data in an inserted list, pivot table, or chart without losing
268
- global filters that have been applied, click :menuselection: `Data --> Refresh all data ` from
269
- the menu bar.
286
+ global filters that have been applied, click :menuselection: `Data --> ` :icon: ` os-refresh- data `
287
+ :menuselection: ` Refresh all data ` from the menu bar.
270
288
271
289
- **Change the order ** of existing filters by hovering over a filter and using the
272
290
:icon: `os-thin-drag-handle ` :guilabel: `(drag handle) ` icon to change the position.
0 commit comments