-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
464bb1a
commit e98568f
Showing
7 changed files
with
74 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ Colorize field in tree views | |
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:f6356258dae95cac6cf463ac8565680182dc73987f8d9f528ffab3567773e0bc | ||
!! source digest: sha256:9421f600f808456315bd58fa3ad58e5d8790f99fb1f0809e81ce7bb0ef0774b1 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
|
@@ -34,10 +34,10 @@ view according to data in the record. | |
Features | ||
-------- | ||
|
||
- 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 ``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 | ||
|
||
**Table of contents** | ||
|
||
|
@@ -47,44 +47,44 @@ Features | |
Usage | ||
===== | ||
|
||
- In the tree view declaration, put | ||
``options='{"bg_color": "red: customer==True"}`` attribute in the | ||
``field`` tag: | ||
- In the tree view declaration, put | ||
``options='{"bg_color": "red: customer==True"}`` attribute in the | ||
``field`` tag: | ||
|
||
:: | ||
:: | ||
|
||
... | ||
<field name="arch" type="xml"> | ||
<tree string="View name"> | ||
... | ||
<field name="name" options='{"bg_color": "red: customer == True"}'/> | ||
... | ||
</tree> | ||
</field> | ||
... | ||
... | ||
<field name="arch" type="xml"> | ||
<tree string="View name"> | ||
... | ||
<field name="name" options='{"bg_color": "red: customer == True"}'/> | ||
... | ||
</tree> | ||
</field> | ||
... | ||
|
||
With this example, column which renders 'name' field will have its **background** colored in red on customer records. | ||
With this example, column which renders 'name' field will have its **background** colored in red on customer records. | ||
|
||
- In the tree view declaration, put | ||
``options='{"fg_color": "white:customer == True"}'`` attribute in the | ||
``field`` tag: | ||
- In the tree view declaration, put | ||
``options='{"fg_color": "white:customer == True"}'`` attribute in the | ||
``field`` tag: | ||
|
||
:: | ||
:: | ||
|
||
... | ||
<field name="arch" type="xml"> | ||
<tree string="View name"> | ||
... | ||
<field name="name" options='{"fg_color": "white:customer == True"}'/> | ||
... | ||
</tree> | ||
</field> | ||
... | ||
... | ||
<field name="arch" type="xml"> | ||
<tree string="View name"> | ||
... | ||
<field name="name" options='{"fg_color": "white:customer == True"}'/> | ||
... | ||
</tree> | ||
</field> | ||
... | ||
|
||
With this example, column which renders 'name' field will have its **text** colored in white on customer records. | ||
With this example, column which renders 'name' field will have its **text** colored in white on customer records. | ||
|
||
- If you want to use more than one color, you can split the attributes | ||
using ';': | ||
- If you want to use more than one color, you can split the attributes | ||
using ';': | ||
|
||
:: | ||
|
||
|
@@ -104,21 +104,21 @@ Example: | |
</field> | ||
... | ||
- Can use strings too... In the tree view declaration, put | ||
``options="{'fg_color': 'green:customer_state == \'success\''}"`` | ||
attribute in the ``field`` tag: | ||
- Can use strings too... In the tree view declaration, put | ||
``options="{'fg_color': 'green:customer_state == \'success\''}"`` | ||
attribute in the ``field`` tag: | ||
|
||
:: | ||
:: | ||
|
||
... | ||
<field name="arch" type="xml"> | ||
<tree string="View name"> | ||
... | ||
<field name="name" options="{'fg_color': 'green:customer_state == \'success\''}"/> | ||
... | ||
</tree> | ||
</field> | ||
... | ||
... | ||
<field name="arch" type="xml"> | ||
<tree string="View name"> | ||
... | ||
<field name="name" options="{'fg_color': 'green:customer_state == \'success\''}"/> | ||
... | ||
</tree> | ||
</field> | ||
... | ||
|
||
**Note that you can use single or normal quotes. If the declaration of | ||
the options doesn't follow the JSON format, the options string will be | ||
|
@@ -127,14 +127,14 @@ evaluated using py.eval()** | |
Known issues / Roadmap | ||
====================== | ||
|
||
- Before version 13.0, this module had a feature allowing to change the | ||
color of a line depending on a field, using a ``colors`` attribute | ||
with the name of the field on the ``<tree>`` element. Since 13.0, the | ||
``colors`` attribute is no longer in the RelaxNG schema of the tree | ||
view, so we can't use it anymore. This feature has then been dropped, | ||
but could be reimplement in another way. | ||
- Since version 17.0 coloring is written into ``style`` attribute of | ||
(td) element | ||
- Before version 13.0, this module had a feature allowing to change the | ||
color of a line depending on a field, using a ``colors`` attribute | ||
with the name of the field on the ``<tree>`` element. Since 13.0, the | ||
``colors`` attribute is no longer in the RelaxNG schema of the tree | ||
view, so we can't use it anymore. This feature has then been dropped, | ||
but could be reimplement in another way. | ||
- Since version 17.0 coloring is written into ``style`` attribute of | ||
(td) element | ||
|
||
Bug Tracker | ||
=========== | ||
|
@@ -158,21 +158,21 @@ Authors | |
Contributors | ||
------------ | ||
|
||
- Damien Crier <[email protected]> | ||
- Holger Brunn <[email protected]> | ||
- Artem Kostyuk <[email protected]> | ||
- Guewen Baconnier <[email protected]> | ||
- Phuc Tran Thanh <[email protected]> | ||
- Sylvain LE GAL <https://twitter.com/legalsylvain> | ||
- Jurgis Pralgauskis <[email protected]> | ||
- Damien Crier <[email protected]> | ||
- Holger Brunn <[email protected]> | ||
- Artem Kostyuk <[email protected]> | ||
- Guewen Baconnier <[email protected]> | ||
- Phuc Tran Thanh <[email protected]> | ||
- Sylvain LE GAL <https://twitter.com/legalsylvain> | ||
- Jurgis Pralgauskis <[email protected]> | ||
|
||
Other credits | ||
------------- | ||
|
||
The development of this module has been financially supported by: | ||
|
||
- Camptocamp | ||
- Versada | ||
- Camptocamp | ||
- Versada | ||
|
||
Maintainers | ||
----------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters