@@ -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,28 @@ 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, with the **Dashboards ** app open,
97
+ :ref: `activate developer mode <developer-mode >`, then click the :icon: `fa-pencil `
98
+ :guilabel: `(Edit) ` icon that appears when hovering over the dashboard name.
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
+
102
+
92
103
.. _spreadsheet/global-filters/create-date :
93
104
94
105
Date
@@ -101,32 +112,15 @@ Date
101
112
With the :guilabel: `Filter properties ` pane open:
102
113
103
114
#. 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
-
115
+ #. To set a :guilabel: `Default value `, select one of the available values, e.g, `Last 30 Days ` or
116
+ `Month to Date `. When applying the global filter, any of the available values can be selected.
123
117
#. In the :guilabel: `Field matching ` section, for each data source, click beside :guilabel: `Date
124
118
field ` and select the field the filter should match with.
125
119
126
120
The :guilabel: `Period offset ` option, which appears when a date field is chosen, enables
127
121
comparisons to be made by shifting the time range by one or more periods in the past or future.
128
122
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.
123
+ or :guilabel: `Next `, then select the desired number of periods in the past or future.
130
124
131
125
.. tip ::
132
126
@@ -142,20 +136,19 @@ With the :guilabel:`Filter properties` pane open:
142
136
#. Click :guilabel: `Save `.
143
137
144
138
.. 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.
139
+ In the example below, a :guilabel: `Date ` global filter allows the pivot table and chart to show
140
+ sales data for any defined time period, in this case, `July 2025 `. The :guilabel: `Custom Range `
141
+ always shows the actual dates corresponding to the chosen period; it can also be updated
142
+ directly.
148
143
149
144
.. image :: global_filters/example-date.png
150
- :alt: A date filter to filter on quarter and year
145
+ :alt: A date filter filters data for July 2025
151
146
152
147
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.
148
+ :guilabel: `Order Date ` has been selected as the matching date field.
155
149
156
150
.. image :: global_filters/field-matching-date.png
157
151
:alt: A date filter with the Order Date selected as the matching field
158
- :scale: 80%
159
152
160
153
.. _spreadsheet/global-filters/create-relation :
161
154
@@ -191,66 +184,92 @@ With the :guilabel:`Filter properties` pane open:
191
184
#. Click :guilabel: `Save `.
192
185
193
186
.. 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 `.
187
+ In the example below, a :guilabel: `Relation ` filter allows the pivot table and chart to show
188
+ sales data related to selected salespeople only. The *User * model is set as the
189
+ :guilabel: `Related model `.
197
190
198
191
.. image :: global_filters/example-relation.png
199
192
:alt: Relation filter set on a pivot table
200
193
201
194
In the :guilabel: `Field matching ` section of the :guilabel: `Filter properties `, the field
202
195
: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.
196
+ and the chart.
205
197
206
198
.. image :: global_filters/field-matching-relation.png
207
199
:alt: A relation filter with the User model configured
208
- :scale: 80%
209
200
210
201
.. _spreadsheet/global-filters/create-text :
211
202
212
203
Text
213
204
----
214
205
215
206
.. 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.
207
+ A :guilabel: `Text ` filter can only match with a :ref: `Text
208
+ <studio/fields/simple-fields-text>` (char) , :ref: `Integer <studio/fields/simple-fields-integer >`,
209
+ or :ref: `Decimal <studio/fields/simple-fields-decimal >` (float) field.
219
210
220
211
With the :guilabel: `Filter properties ` pane open:
221
212
222
213
#. Enter a name for the new text filter in the :guilabel: `Label ` field.
223
214
#. 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.
215
+ spreadsheet range either by typing the range or selecting it from the relevant sheet. The
216
+ referenced range must be in the same spreadsheet.
225
217
#. Optionally, enter a :guilabel: `Default value `.
226
218
#. In the :guilabel: `Field matching ` section, for each data source click below the data source name
227
219
and select the field the :guilabel: `Text ` filter should match with.
228
220
229
221
#. Click :guilabel: `Save `.
230
222
231
223
.. 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 .
224
+ In the example below, a :guilabel: `Text ` global filter allows the pivot table and chart to show
225
+ sales data only for products whose internal reference matches or contains the entered value, in
226
+ this case, ` FURN `. Multiple values can be entered if desired .
235
227
236
228
.. image :: global_filters/example-text.png
237
229
:alt: Global filters set on a pivot table
238
230
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 .
231
+ In the :guilabel: `Field matching ` section of the :guilabel: `Filter properties `, the
232
+ :guilabel: ` Internal Reference ` of the :guilabel: `Product Variant ` was selected as the matching
233
+ field for both the pivot table and the chart .
242
234
243
235
.. image :: global_filters/field-matching-text.png
244
- :alt: A text filter with a restricted range
245
- :scale: 80%
236
+ :alt: A text filter matched to the product's internal reference
237
+
238
+ .. tip ::
239
+ If you selected :guilabel: `Restrict values to range ` when configuring the text filter and
240
+ defined a range, you select the value of the text field from a dropdown.
246
241
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.
242
+ .. _spreadsheet/global-filters/create-checkbox :
243
+
244
+ Yes/No
245
+ ------
246
+
247
+ .. note ::
248
+ A :guilabel: `Yes/No ` filter can only match with a :ref: `Checkbox
249
+ <studio/fields/simple-fields-checkbox>` (boolean) field.
250
+
251
+ With the :guilabel: `Filter properties ` pane open:
252
+
253
+ #. Enter a name for the new :guilabel: `Yes/No ` filter in the :guilabel: `Label ` field.
254
+ #. Optionally, select :guilabel: `Is set ` or :guilabel: `Is not set ` as the :guilabel: `Default value `.
255
+ #. In the :guilabel: `Field matching ` section, for each data source, click below the data source name
256
+ and select the field the :guilabel: `Yes/No ` filter should match with.
257
+ #. Click :guilabel: `Save `.
258
+
259
+ .. example ::
260
+ In the example below, a :guilabel: `Yes/No ` global filter was created to allow the user to see
261
+ all opportunities that are active, i.e., for which the :guilabel: `Active ` checkbox is enabled
262
+ on the record, or all opportunities that are inactive, i.e., for which the :guilabel: `Active `
263
+ checkbox is disabled. Leaving the filter empty shows both active and inactive opportunities.
264
+
265
+ .. image :: global_filters/example-boolean.png
266
+ :alt: Global filters set on a pivot table
267
+
268
+ In the :guilabel: `Field matching ` section of the :guilabel: `Filter properties `, the field
269
+ :guilabel: `Active ` was assigned as the matching field for the pivot table.
251
270
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.
271
+ .. image :: global_filters/field-matching-checkbox.png
272
+ :alt: A yes/no filter with the Active field set as matching field
254
273
255
274
Manage and use global filters
256
275
=============================
@@ -265,8 +284,8 @@ It is possible to:
265
284
.. tip ::
266
285
Reloading the browser will cause any global filters to reset to their initial state or default
267
286
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.
287
+ global filters that have been applied, click :menuselection: `Data --> ` :icon: ` os-refresh- data `
288
+ :menuselection: ` Refresh all data ` from the menu bar.
270
289
271
290
- **Change the order ** of existing filters by hovering over a filter and using the
272
291
:icon: `os-thin-drag-handle ` :guilabel: `(drag handle) ` icon to change the position.
0 commit comments