Skip to content

Conditions

Conditions are used to get a value based on a matching condition. Example of uses are:

Usage

<tree string="This is a list" colors="red:status=='unpaid';orange:status=='checking'">
<field name="name" />
<field name="email" />
<field name="status" />
</tree>

The structure of the condition is value:condition. In this case value is the color of the text and the condition is the condition to match.

More than one condition can be used, separated by ; but only the first match will be used.