From 1d6e4948d2e8534379b6815e931a6eaa58955e18 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 29 Apr 2020 07:21:34 +0000 Subject: [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. Part of task 2195254 --- doc/reference/javascript_reference.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/reference/javascript_reference.rst') diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst index 9069916a250..7d5b6e6af35 100644 --- a/doc/reference/javascript_reference.rst +++ b/doc/reference/javascript_reference.rst @@ -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 + + + Relational fields ----------------- -- cgit v1.2.3