Axelor Doc

The views

In order to interact with the object, define a view.

The XML engine generates user interfaces by default from the model. In many cases, this is enough, but sometimes it is necessary to customize the interface.

The view is also defined in XML and used to organize the fields of an object at your convenience.

There are several types of views:

  • The views lists
  • The views forms
  • The calendar views
  • The views trees
  • ...

The list view is defined by the tag <Grid> while the views are defined by the form tag <form> .

<grid title="Companies" name="company-grid" model="com.axelor.contact.db.Company">
    <field name="name"/>
    <field name="code"/>
    <field name="parent"/>
</grid>

<form cols="4" title="Company" name="company-form" model="com.axelor.contact.db.Company">
    <field name="name"/>
    <field name="code"/>
    <field domain="self.code != :code" name="parent"/>
    <field noLabel="true" name="notes"/>
</form>