تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2719 أدوات العرض

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.

الصورة الرمزية
إهمال
أفضل إجابة

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.