[IMP] web: add BadgeField component
This new field component displays the field's value inside a bootstrap pill badge. Supported field types are 'char', 'selection' and 'many2one'. The background color of the badge can be customized by using the decoration-xxx mechanism, e.g. <field name="state" decoration-danger="state == 'cancel'" widget="badge"/> Part of task 2195254
This commit is contained in:
@@ -2028,6 +2028,19 @@ order.
|
||||
|
||||
- Supported field types: *char, text*
|
||||
|
||||
- badge (FieldBadge)
|
||||
Displays the value inside a bootstrap badge pill.
|
||||
|
||||
- Supported field types: *char*, *selection*, *many2one*
|
||||
|
||||
By default, the badge has a lightgrey background, but it can be customized
|
||||
by using the decoration-X mechanism. For instance, to display a red badge
|
||||
under a given condition:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<field name="foo" widget"badge" decoration-danger="state == 'cancel'"/>
|
||||
|
||||
Relational fields
|
||||
-----------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user