Sök, filtrera och gruppera poster¶
Odoo allows for the searching, filtering, and grouping of records in a view to display only the most relevant records. The search bar is located at the top of the view: start typing to search for values, or click the (dropdown) icon to access the Filter, Group By, and Favorites drop-down menus.
Sök efter värden¶
Use the search field to look for specific values, and add them as a filter. Type the value to search for (like a salesperson’s name or a product), and select the desired option from the drop-down menu to apply the search filter.
Example
Instead of adding a custom filter to select records where
Mitchell Admin is the salesperson on the Sales Analysis report ( ), search for Mitch
, and click the
(submenu) icon next to Search Salesperson for: Mitch, and select
Mitchell Admin.

Observera
Using the search field is equivalent to using the contains operator when adding a custom filter. If a partial value is entered, and the desired field is directly selected (without selecting the (submenu), all records containing the typed characters for the selected field are included.
Filter¶
Filter används för att välja poster som uppfyller specifika kriterier. Standardurvalet av poster är specifikt för varje vy, men kan ändras genom att välja ett (eller flera) förkonfigurerade filter, eller genom att lägga till ett anpassat filter.
Förkonfigurerade filter¶
Modify the default selection of records by clicking the (dropdown) from the search bar, and selecting one (or several) preconfigured filters from the Filters drop-down menu.
Example
I rapporten Sales Analysis (:menyval:`Sales app --> Rapportering --> Försäljning`) väljs som standard endast poster som befinner sig i beställningsstadiet och som har ett beställningsdatum inom de senaste 365 dagarna.
För att även inkludera poster i quotation-stadiet, välj Quotations från Filters.
Furthermore, to only include sales order and quotation records from a specific year, like 2024,
for example, first remove the existing Order Date: Last 365 Days
filter by clicking
(cancel), then select the
filter.

Observera
De förkonfigurerade Filtren är grupperade och varje grupp åtskiljs av en horisontell linje. Om du väljer förkonfigurerade filter från samma grupp kan posterna matcha valfritt av de tillämpade villkoren. Om du däremot väljer filter från olika grupper måste posterna motsvara alla de tillämpade villkoren.
Anpassade filter¶
If the preconfigured filters are not specific enough, add a custom filter. To do so, click the (dropdown) icon in the search bar, then select .
I popup-fönstret Add Custom Filter visas matchningsalternativet, filterregeln och en växlingsfunktion för att Include archived records.

Standardkonfigurationen för matchning är Matcha någon av följande regler, vilket innebär att varje filterregel tillämpas oberoende av varandra. För att ändra matchningskonfigurationen till Matcha alla följande regler måste minst två filterregler läggas till i det anpassade filtret.
Match all of the following rules: All of the filter rules must be met. Think of this as an AND (
&
) operation.Match any of the following rules: Any of the filter rules can be met. Think of this as an OR (
|
) operation.
Som standard läggs en enda filterregel till i det anpassade filtret. I det följande beskrivs strukturen för en filterregel:
The first inline field is the field name to filter by. Some fields have refined parameters that are nested within another field. These fields have a (submenu) icon beside them, which can be selected to reveal the nested fields.
Det andra inline-fältet är den villkorliga operator som används för att jämföra fältnamnet med värdet. De tillgängliga villkorliga operatorerna är specifika för fältets datatyp.
Det tredje inline-fältet är variabeln värde i fältnamnet. Värdeinmatningen kan visas som en rullgardinsmeny, en textinmatning, en nummerinmatning, en datum-/tidsinmatning, en boolesk väljare eller vara tom, beroende på vilken operator som används och fältets datatyp.
Tre inline-knappar finns också tillgängliga till höger om regelns filterkriterier:
(plus): Adds a new rule below the existing rule.
(node): Adds a new group of rules below the existing rule, with the any and all matching options available to define how each rule within this branch is applied to the filter. If the matching option is set to the same as the parent group, the fields are moved to join the parent group.
Example
If the matching option is set to Match all of the following rules, and a new branch is added with its matching option changed from any of to all of, the newly-added branch disappears, and its group of rules are moved to the parent group.
(delete): Deletes the node. If a branch node is deleted, all children of that node are deleted, as well.
En ny filterregel kan läggas till i det anpassade filtret genom att klicka på knappen New Rule.
När filterkriterierna har definierats klickar du på Add för att lägga till det anpassade filtret i vyn.
Example
För att rikta in alla leads och möjligheter från
-appen som befinner sig i Won-stadiet och har en förväntad intäkt på mer än 1 000 USD, ska följande anges:Match all of the following rules:
Stage är i Vann
Förväntad intäkt >`
1.000
any of:
Typ = Lead
Typ = Opportunity

Tips
Aktivera Utvecklarläge (felsökningsläge) för att visa varje fälts tekniska namn och datatyp, samt textområdet # Code editor under filterreglerna, så att du kan visa och redigera domänen manuellt.
Gruppregister¶
The display of records in a view can be clustered together, according to one of the preconfigured groups. To do so, click the (dropdown) icon in the search bar, then select one of the Group By options from the drop-down menu.
Example
Om du vill gruppera posterna efter säljare i rapporten Sales Analysis (:menyval:`Sales app --> Rapportering --> Försäljning`) klickar du på alternativet Säljare i rullgardinsmenyn Gruppera efter. Vyn ändras så att posterna grupperas efter säljare, utan att några poster filtreras bort.

Det är möjligt att anpassa grupper genom att använda ett fält som finns i modellen. För att göra detta klickar du på
och väljer ett fält i rullgardinsmenyn.Observera
Flera grupper kan användas samtidigt. Den första gruppen som väljs är huvudklustret, nästa grupp som läggs till delar upp huvudgruppens kategorier ytterligare och så vidare. Dessutom kan filter och grupper användas tillsammans för att förfina vyn ännu mer.
Jämförelse¶
Certain reporting dashboards include a Comparison section in the drop-down menus of their search bars. This includes the Overall Equipment Effectiveness report for the Manufacturing app and the Purchase report for the Purchase app, among others.
The options in the Comparison section are used to compare data from two different time periods. Pick between the two comparison options: (Time Filter): Previous Period and (Time Filter): Previous Year.
Viktigt
- For some reports, the Comparison section only appears in the search bar drop-down
menu if one (or more) time periods have been selected in the Filters column. This is because there is nothing to compare if no time period is specified.
Additionally, some reports only allow use of the Comparison feature when the (Pie Chart) graph type or the (Pivot) view, is selected. A Comparison option can be selected even if another view is enabled, but doing so does not change the way data is displayed on the report.

To view data using one of the two comparisons, begin by selecting a time period in the Filters column of the search bar drop-down menu. Then, select either (Time Filter): Previous Period or (Time Filter): Previous Year in the Comparison section.
Om ett av alternativen i Comparison är aktiverat jämför rapporten data för den valda perioden med data för samma tidsenhet (månad, kvartal, år), en period eller ett år tidigare. Hur data visas beror på vilken vy som valts:
The (Bar Chart) shows two bars, side-by-side, for each unit of time for the selected time period. The left bar represents the selected time period, while the right bar represents the previous time period.
The (Line Chart) is displayed with two lines, one representing the selected time period, and the other representing the previous time period.
The (Pie Chart) appears as a large circle with a smaller circle inside. The larger circle represents the selected time period, while the smaller circle represents the previous time period.
The (Pivot) is displayed with each column split into two smaller columns. The right column represents the selected time period, while the left column represents the previous time period.
Example
In the Production Analysis report of the app, data for the second quarter of 2024 is compared to data for the second quarter of 2023. Q2 is selected in the End Date filter section of the search bar drop-down menu. In the Comparison section, End Date: Previous Year is selected.
Det aktuella året är 2024, så den större cirkeln visar data för andra kvartalet (Q2) 2024. Den mindre cirkeln visar data för andra kvartalet (Q2) 2023, vilket är samma tidsperiod, men ett år tidigare.
Om Slutdatum: Previous Period istället väljs, visar den mindre cirkeln data för första kvartalet (Q1) 2024, vilket är samma tidsperiod, men en period tidigare.

Favoriter¶
Favoriter är ett sätt att spara en viss sökning för framtida användning, eller som nytt standardfilter för vyn.
To save the current view as a favorite, click the (dropdown) icon in the search bar, then select the Save current search drop-down menu to display the following options:
Filter name: Name of the favorited search.
Default filter: Sets the favorited search as the default filter for the view.
Shared: Makes the favorited search available to all users. Otherwise, by default, the favorited search is only available to the user who created it.
När alternativen har ställts in klickar du på Save för att spara den favoritmarkerade sökningen.

Saved favorites can be accessed by clicking the (delete) icon in the search bar, then selecting the saved filter in the Favorites drop-down menu. To remove a saved favorite, click the (delete) icon next to the favorited search.
Tips
För att visa alla favoritsökningar, aktivera först utvecklarläge, och navigera till . Härifrån kan alla favoriserade sökningar visas, redigeras, arkiveras eller raderas.