Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2723 Vistas

i need to add some multiple colors to odoo tree view based its state value i tried builtin decorations but it contains only few colors please help me in this.

Avatar
Descartar
Mejor respuesta

Hello paidy kumar,

Hope you are doing well.

You have to download the OCA module "Colorize field in tree views" (https://odoo-community.org/shop/product/colorize-field-in-tree-views-2814#attr=11029) and installed it into your odoo version. Then you have to write the code below in your tree view:

see comment :





Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari 

Avatar
Descartar

<tree>
<field name="name" options='{"bg_color": "red: is_state == True(Here you write the condition based on states.)"}'/>
<field name="is_state"/>
</tree>

Autor

thanks for your answer sir .this is for column wise coloring..i need row color same like decorators functionality

Hello paidy kumar,

Hope you are doing well.

If you want row wise coloring then you need to write "options='{"bg_color": "red: is_state == True(Here you write the condition based on states.)"}" into all the fields of tree view in xml file.