Axelor Doc

The search criteria

The search criteria are set up using the tag <search-fields> . Inside this tag, you must then list the fields specifying the type.

Each search field is defined using the tag <field>. structure of the tag is as follows: SearchField

Details of tags used:

  • name : Technical Field Name (Required)
  • title : Label field
  • type : Field type from a list
  • target : target class in the case of relational field
  • widget : Widget used

The field types used are:

  • string
  • integer
  • boolean
  • decimal
  • date
  • datetime
  • reference: In the latter case, it will add the option target to inform the target class.

The widget can be used are:

  • SuggestBox: Display of M2O by a dropdown list

Example:

<search-fields>
    <field name="partner" type="reference" target="com.axelor.contact.db.Contact" />
    <field name="product" type="reference" target="com.axelor.sale.db.Product" widget="SuggestBox" />
    <field name="customer" type="string" />
    <field name="date" type="date" />
    <field name="value" type="decimal" />
</search-fields>

The search criteria