[UPD] README.rst

pull/2505/head
OCA-git-bot 2023-04-18 19:07:20 +00:00
parent 897f924d4e
commit 56aff406fa
2 changed files with 8 additions and 4 deletions

View File

@ -39,7 +39,8 @@ Features
* Add attribute ``bg_color`` on field's ``options`` to color background of a cell in tree view * Add attribute ``bg_color`` on field's ``options`` to color background of a cell in tree view
* Add attribute ``fg_color`` on field's ``options`` to change text color of a cell in tree view * Add attribute ``fg_color`` on field's ``options`` to change text color of a cell in tree view
* Add attribute ``color_field`` on the tree element's ``colors`` to use as color * Add attribute ``color_field`` on the tree element's ``colors`` to use as text color
* Add attribute ``bg_color_field`` on the tree element's ``colors`` to use as background color
**Table of contents** **Table of contents**
@ -81,9 +82,10 @@ Usage
... ...
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="View name" colors="color_field: my_color" > <tree string="View name" colors="color_field: my_color; bg_color_field: my_background_color" >
... ...
<field name="my_color" invisible="1"/> <field name="my_color" invisible="1"/>
<field name="my_background_color" invisible="1"/>
... ...
</tree> </tree>
</field> </field>

View File

@ -379,7 +379,8 @@ a fields value as color.</p>
<ul class="simple"> <ul class="simple">
<li>Add attribute <tt class="docutils literal">bg_color</tt> on fields <tt class="docutils literal">options</tt> to color background of a cell in tree view</li> <li>Add attribute <tt class="docutils literal">bg_color</tt> on fields <tt class="docutils literal">options</tt> to color background of a cell in tree view</li>
<li>Add attribute <tt class="docutils literal">fg_color</tt> on fields <tt class="docutils literal">options</tt> to change text color of a cell in tree view</li> <li>Add attribute <tt class="docutils literal">fg_color</tt> on fields <tt class="docutils literal">options</tt> to change text color of a cell in tree view</li>
<li>Add attribute <tt class="docutils literal">color_field</tt> on the tree elements <tt class="docutils literal">colors</tt> to use as color</li> <li>Add attribute <tt class="docutils literal">color_field</tt> on the tree elements <tt class="docutils literal">colors</tt> to use as text color</li>
<li>Add attribute <tt class="docutils literal">bg_color_field</tt> on the tree elements <tt class="docutils literal">colors</tt> to use as background color</li>
</ul> </ul>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
</div> </div>
@ -420,9 +421,10 @@ With this example, column which renders 'name' field will have its text colored
<pre class="literal-block"> <pre class="literal-block">
... ...
&lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;
&lt;tree string=&quot;View name&quot; colors=&quot;color_field: my_color&quot; &gt; &lt;tree string=&quot;View name&quot; colors=&quot;color_field: my_color; bg_color_field: my_background_color&quot; &gt;
... ...
&lt;field name=&quot;my_color&quot; invisible=&quot;1&quot;/&gt; &lt;field name=&quot;my_color&quot; invisible=&quot;1&quot;/&gt;
&lt;field name=&quot;my_background_color&quot; invisible=&quot;1&quot;/&gt;
... ...
&lt;/tree&gt; &lt;/tree&gt;
&lt;/field&gt; &lt;/field&gt;