Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 60 |
Technical Name |
crnd_web_tree_colored_field |
License | LGPL-3 |
Website | https://crnd.pro |
Versions | 17.0 16.0 15.0 13.0 14.0 12.0 |
CRnD Web Tree Colored Field
CRnD Web Tree Colored Field widget provide to display tree cell with color from another field or color, that depends on value of other field.
An example of internal usage defining color from another field:
In Python code:
line_bg_color = fields.Char('rgba(R,G,B[,A])') line_label_color = fields.Char('rgba(R,G,B[,A])')
In XML code:
<record id="some_id" model="ir.ui.view"> <field name="model">model.name</field> <field name="arch" type="xml"> <tree> <field name="colored_field" options="{ 'field_bg_color': 'line_bg_color', 'field_label_color': 'line_label_color'}"/> <field name="line_bg_color" invisible="1"/> <field name="line_label_color" invisible="1"/> </tree> </field> </record>
An example of internal usage defining color, depends on value of another field:
In Python code:
state = fields.Selection([ ('ok', 'Ok'), ('warning', 'Warning'), ('fail', 'Fail') ])
In XML code:
<record id="some_id" model="ir.ui.view"> <field name="model">model.name</field> <field name="arch" type="xml"> <tree> <field name="colored_field" options="{"field_label_color_expression": " red:state == 'fail'; #2F4F4F:state == 'warning'; green:state == 'ok'", "field_bg_color_expression": " white:state == fail; yellow:state == 'warning'; #D3D3D3:state == 'ok'"}"/>/> <field name="state" invisible="1"/> </tree> </field> </record>
Bug Tracker
Bugs are tracked on https://crnd.pro/requests. In case of trouble, please report there.
Launch your own ITSM system in 60 seconds:
Create your own Bureaucrat ITSM database
Maintainer
![CR&D](https://crnd.pro/web/image/3699/300x140/crnd.png)
Our web site: https://crnd.pro
This module is maintained by the Center of Research & Development company.
We can provide you further Odoo Support, Odoo implementation, Odoo customization, Odoo 3rd Party development and integration software, consulting services. Our main goal is to provide the best quality product for you.
For any questions contact us.
Please log in to comment on this module