Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
19968 Lượt xem

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 ?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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; 
}
Ảnh đại diện
Huỷ bỏ
Tác giả

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; }

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 11 23
3151
3
thg 4 24
2400
0
thg 12 19
5521
2
thg 10 22
5582
3
thg 8 22
7073