summaryrefslogtreecommitdiff
path: root/doc/reference/views.rst
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2020-04-29 07:21:31 +0000
committerAaron Bohy <aab@odoo.com>2020-05-05 08:48:34 +0000
commita1d3e224d874dcee966b2df97f24605e816d40d4 (patch)
tree3eb4c49238d3fe48c6b1c40ffcab2ae429cc9f95 /doc/reference/views.rst
parent47144b9ee4afd9f1dec9e6e66f7b38f75bdf31e9 (diff)
[IMP] web: list: allow to add decorations on field nodes
In list views, one can specify decoration-XXX attributes on the arch root node. Those decorations are evaluated for each record, and the corresponding style is applied on rows for which the condition is true. This commit allows to specify those decoration-XXX attributes on field nodes as well. In this case, when the condition is met by a record, only the field on which the attribute is set will be impacted. Part of task 2195254
Diffstat (limited to 'doc/reference/views.rst')
-rw-r--r--doc/reference/views.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/reference/views.rst b/doc/reference/views.rst
index c36327df7aa..4dad4a4f726 100644
--- a/doc/reference/views.rst
+++ b/doc/reference/views.rst
@@ -1469,6 +1469,13 @@ Possible children elements of the list view are:
be 3 times larger than the others). Note that when there are records in
the list, we let the browser automatically adapt the column's widths
according to their content, and this attribute is thus ignored.
+ ``decoration-{$name}``
+ allow changing the style of a cell's text based on the corresponding
+ record's attributes.
+
+ ``{$name}`` can be ``bf`` (``font-weight: bold``), ``it``
+ (``font-style: italic``), or any `bootstrap contextual color`_ (``danger``,
+ ``info``, ``muted``, ``primary``, ``success`` or ``warning``).
.. note::