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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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
<tree>
<field name="name" options='{"bg_color": "red: is_state == True(Here you write the condition based on states.)"}'/>
<field name="is_state"/>
</tree>
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.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up