From 80a580fd93d37d59474b3a18de7f5b21c8188deb Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 17 Oct 2022 13:55:45 +0000 Subject: [PATCH] [UPD] README.rst --- web_tree_dynamic_colored_field/README.rst | 16 ++++++++++++++++ .../static/description/index.html | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/web_tree_dynamic_colored_field/README.rst b/web_tree_dynamic_colored_field/README.rst index 6808c78a4..eb1dea328 100644 --- a/web_tree_dynamic_colored_field/README.rst +++ b/web_tree_dynamic_colored_field/README.rst @@ -70,6 +70,21 @@ Usage With this example, column which renders 'name' field will have its text colored in white on a customer records. +* In the tree view declaration, use ``options='"color_field": "my_color"'`` attribute in the ``tree`` tag:: + + ... + + + ... + + ... + + + ... + +* You can also use ``colors="bg_color_field: my_color"`` to defined the field name that will be used + for the background color of the line. + * If you want to use more than one color, you can split the attributes using ';': .. code:: @@ -134,6 +149,7 @@ Contributors * Artem Kostyuk * Guewen Baconnier * Phuc Tran Thanh +* Sylvain LE GAL Other credits ~~~~~~~~~~~~~ diff --git a/web_tree_dynamic_colored_field/static/description/index.html b/web_tree_dynamic_colored_field/static/description/index.html index 3741d95f3..6caaccf29 100644 --- a/web_tree_dynamic_colored_field/static/description/index.html +++ b/web_tree_dynamic_colored_field/static/description/index.html @@ -411,6 +411,22 @@ With this example, column which renders 'name' field will have its background co With this example, column which renders 'name' field will have its text colored in white on a customer records. +
  • In the tree view declaration, use options='"color_field": "my_color"' attribute in the tree tag:

    +
    +...
    +<field name="arch" type="xml">
    +    <tree string="View name" colors="color_field: my_color" >
    +        ...
    +        <field name="my_color" invisible="1"/>
    +        ...
    +    </tree>
    +</field>
    +...
    +
    +
  • +
  • You can also use colors="bg_color_field: my_color" to defined the field name that will be used +for the background color of the line.

    +
  • If you want to use more than one color, you can split the attributes using ‘;’:

  • @@ -472,6 +488,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Artem Kostyuk <a.kostyuk@mobilunity.com>
  • Guewen Baconnier <guewen.baconnier@camptocamp.com>
  • Phuc Tran Thanh <phuc@trobz.com>
  • +
  • Sylvain LE GAL <https://twitter.com/legalsylvain>