検索、フィルタとグループレコード

Odooでは、ビュー内のレコードを検索、フィルタリング、グループ化して、最も関連性の高いレコードのみを表示することができます。検索バーはビューの上部にあり、 値を検索 と入力するか、 🔽 (下向き矢印) アイコンをクリックして、フィルタ, グループ化, お気に入り ドロップダウンメニューにアクセスします。

値を検索する

検索フィールドを使用して、特定の値をすばやく検索し、フィルタとして追加します。検索する値を入力し、ドロップダウンメニューから必要なオプションを選択して、検索フィルタを適用します。

Example

Mitchell Admin が販売担当である 販売分析 レポート (販売アプリ ‣ レポーティング ‣ 販売) のレコードを選択するために カスタムフィルタ を追加する代わりに、Mitch を選択して、 販売担当を検索: Mitch の隣にある ⏵ (右矢印) をクリックして Mitchell Admin を選択します。

販売分析レポートでの特定の値の検索

注釈

検索フィールドを利用するのと、 カスタムフィルタ を追加する際に、 contains 演算子を使用するのは同じことです。一部だけ値を入力した後、目的のフィールドが直接選択された場合、 ( ⏵ (右矢印)を選択しなくても) 入力した文字を含むすべてのレコードが選択したフィールドに表示されます。

フィルタ

フィルタは特定の条件を満たすレコードを選択するために使用されます。デフォルトで選択されるレコードはそれぞれのビューに固有のものですが、 設定済フィルタ を一つ(または複数)選択するか、 カスタムフィルタ を追加することで変更することができます。

設定済フィルタ

検索バーから 🔽(下向き矢印) アイコンをクリックし、 フィルタ ドロップダウンメニューから1つ(または複数)の*設定済みフィルタ* を選択することで、レコードのデフォルト選択を変更できます。

Example

販売分析 レポート ( 販売アプリ ‣ レポーティング ‣ 販売) では、販売オーダ の段階にあり、オーダ日 が過去365日以内のレコードのみがデフォルトで選択されます。

見積 段階のレコードも含めるには、フィルタ から 見積 を選択して下さい。

さらに例えば、2024年のような特定の年の販売オーダと見積レコード のみ を含めるには、まず ❌ (削除) アイコンをクリックして、既存の オーダ日: 過去365日 フィルタを削除し、 オーダ日 ‣ 2024 を選択します。

販売分析レポートでの設定済フィルタの使用

注釈

設定済の フィルタ はグループ化されており、各グループは水平線で区切られています。同じグループから事前設定されたフィルタを選択すると、適用された条件の いずれか に一致するレコードを見つけることができます。しかし、他のグループからフィルタを選択するには、レコードは適用された条件の 全て に一致する必要があります。

カスタムフィルタ

設定済フィルタ が具体性に欠ける場合は、カスタムフィルタを追加します。そのためには、検索バーの 🔽 (下向き矢印) アイコンをクリックし、 フィルタ ‣ カスタムフィルタを追加 を選択します。

カスタムフィルタ追加 ポップアップウィンドウには、マッチングオプション、フィルタ規則、そして アーカイブ済 レコードを含めるかどうかのトグルが表示されます。

カスタムフィルタ追加ポップアップ

デフォルトのマッチング設定は 以下の規則のいずれかにマッチする で、それぞれの規則が独立して適用されます。マッチング設定を 以下の規則の全てにマッチする に変更するには、カスタムフィルタに少なくとも2つのフィルタ規則を追加する必要があります。

  • Match all 🔽 of the following rules: all of the filter rules must be met. Logically, this is an AND (&) operation.

  • Match any 🔽 of the following rules: any of the filter rules can be met. Logically, this is an OR (|) operation.

デフォルトでは、カスタムフィルタには1つのフィルタ規則が追加されます。フィルタ規則の構造を以下に示します:

  1. 最初のインラインフィールドは、フィルタリングする フィールド名 です。いくつかのフィールドは別のフィールドの中に入れ子になっている洗練されたパラメータを持っています。これらのフィールドの横には > (矢印) アイコンがあり、これを選択するとネストされたフィールドが表示されます。

  2. 2番目のインラインフィールドは、フィールド名と値を比較するために使用される条件 演算子 です。利用可能な条件演算子 はフィールドのデータ型に固有のものです。

  3. 3番目のインラインフィールドはフィールド名の変数 です。値入力はドロップダウンメニュー、テキスト入力、数値入力、日付/時刻入力、ブーリアンセレクタとして表示されることもありますし、使用される演算子やフィールドのデータタイプによっては空白になることもあります。

規則のフィルタ条件の右側には、3つのインラインボタンも用意されています:

  1. ➕ (プラス記号): は既存の規則の下に新しい規則を追加します。

  2. (Add branch): 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

    一致条件を 以下の全ての 🔽 規則に一致 に設定し、一致オプションを いずれか 🔽 の規則とマッチ から 全て 🔽 の規則とマッチ へ変更した新しいブランチを追加すると、新しく追加されたブランチは消え、その規則グループは親グループに移動します。

  3. 🗑️ (ゴミ箱): ノードを削除します。ブランチノードが削除された場合、そのノードの子ノードも全て削除されます。

新しい規則 ボタンをクリックすることで、カスタムフィルタに新しいフィルタ規則を追加することができます。

フィルタの基準を定義したら、カスタムフィルタをビューに追加するために 追加 をクリックします。

Example

CRM アプリから*成約*ステージにあり、見込収益が$1,000を超える全てのリードと案件をターゲットにするには、以下を入力します:

以下の規則 🔽 (下矢印) と全てマッチ:

  1. ステージ 成約

  2. 見込収益 > 1,000

  3. いずれか 🔽 (下矢印) の:

    • タイプ = リード

    • タイプ = 案件

CRMで特定のレコードをフィルタするカスタムフィルタを追加します。

ちなみに

Activate 開発者モード (デバッグモード) to reveal each field's technical name and data type, as well as the # Code editor text area below the filter rules, to view and edit the domain manually.

レコードをグループ化する

ビュー内のレコードの表示は、設定済グループ のいずれかに従って、まとめて表示することができます。これを行うには、検索バーの 🔽 (下矢印) アイコンをクリックし、ドロップダウンメニューから グループ化 オプションのいずれかを選択します。

Example

To group the records by salesperson on the Sales Analysis report (Sales app ‣ Reporting ‣ Sales), click the Salesperson option from the Group By drop-down menu. The view changes to group the records by salesperson, without filtering out any records.

販売分析レポートのレコードのグループ化

モデル上に存在するフィールドを使用して グループをカスタマイズ することができます。これを行うには カスタムグループを追加 をクリックし、ドロップダウンメニューからフィールドを選択します。

注釈

同時に複数のグループを使用できます。最初に選択されたグループはメインクラスタとなり、次に追加されたグループはメイングループのカテゴリをさらに分割し、といった具合です。フィルタとグループを併用することで、表示をさらに絞り込むことができます。

比較

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. There are two comparison options to choose from: (Time Filter): Previous Period and (Time Filter): Previous Year.

重要

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, if no time period is specified, there is nothing to compare.

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.

The Search... bar for the production analysis 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.

With one of the Comparison options enabled, the report compares the data for the selected period, with the data for the same unit of time (month, quarter, year), one period or year prior. The way the data is displayed depends on the selected view:

  • 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 table) 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 Manufacturing 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.

The current year is 2024, so the larger circle shows data for the second quarter (Q2) of 2024. The smaller circle shows data for the second quarter (Q2) of 2023, which is the same time period, but one year prior.

If End Date: Previous Period is selected instead, the smaller circle shows data for the first quarter (Q1) of 2024, which is the same time period, but one period prior.

The comparison view of the Production Analysis report.

お気に入り

お気に入りは、将来の使用のために特定の検索を保存したり、ビューの新しいデフォルトフィルタとして保存する方法です。

現在のビューをお気に入りとして保存するには、検索バーの 🔽(下矢印) アイコンをクリックし、 現在の検索を保存 ドロップダウンメニューを選択すると、以下のオプションが表示されます:

  • フィルタ名: お気に入り検索の名前。

  • デフォルトフィルタ: はお気に入り検索をビューのデフォルトフィルタとして設定します。

  • 共有済: はお気に入り検索を全てのユーザが利用できるようにします。デフォルトでは、お気に入り検索はその検索を作成したユーザのみが利用できます。

オプションを設定したら、保存 をクリックしてお気に入り検索を保存します。

販売分析レポートのお気に入り検索の保存

保存済のお気に入りには、検索バーの 🔽 (下矢印) アイコンをクリックし、 お気に入り ドロップダウンメニューで保存されたフィルタを選択することでアクセスできます。保存済のお気に入りを削除するには、お気に入り検索の横にある 🗑️ (ゴミ箱) アイコンをクリックします。

ちなみに

全て のお気に入り検索を表示するには、まず 開発者モード を有効化し、 設定アプリ ‣ 技術設定 ‣ ユーザインターフェイス: ユーザ定義のフィルタ に移動します。ここから、全てのお気に入り検索を表示、編集、アーカイブ、削除することができます。