This question has been flagged
3 Replies
17913 Views

Hello,

I have some doubts which are related to tree view in open erp. I want one column of tree view in blue color.

I have mentioned class attribute infront of field in tree view. e.g. in tree view i have declared field like

         <field name="partner_id" class="oe_partner_name_blue">

and class "oe_partner_name_blue" i have added in respected css file which make field font color to blue.

If i have used same class in form view it works fine. but in tree view how i should get partner_id column in blue color ?

Avatar
Discard
Best Answer

If you use Google Chrome's "inspect element" to look at a treeview's field, there is the following definition:

Inherited from div.openerp_webclient_container
.openerp {
font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;
color: #4c4c4c;
font-size: 13px;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

Maybe this is overwriting your own definition, have you tried if putting !important after your font color declaration in the CSS file helps? It will not affect other views.

.oe_partner_name_blue { 
    color: #0000FF!important; 
}
Avatar
Discard
Author

Thanx @Timo, but that will affect on all tree views.I want this for only customer tree view not for others.

I mean like this: .oe_partner_name_blue { color: #0000FF!important; }

Best Answer

Hi @vaibhav,

Try to do so on your custom css file

[data-id="partner_id"]
{
    background-color:#EEEEEE;
}
[data-field="partner_id"]
{
   background-color:#EEEEEE;
}

[data-id="my_field"]====> for a specific th tag and [data-field="my_field"] ====>for specefic td tag

Avatar
Discard
Best Answer

You can do it with data-id AND setting a name of the class attributes of the parent tree.

See this question for an example about how to change the width of a specific column. https://accounts.openerp.com/forum/Help-1/question/35981#39782

Regards.

Avatar
Discard