コンテンツへスキップ
メニュー
この質問にフラグが付けられました
5 返信
41651 ビュー

There is a way to change the width of a column in a tree view?

アバター
破棄

Have you tried that : <field name="name" width="100"/> with the size you want in width ?

@Felipe, is the issue solved?? I am also facing the same problem here... provide me the detail

最善の回答

You can do that with css. First you need to add your own css stylesheet (check help.openerp.com/question/5783/how-to-add-a-custom-css/ on how to do that)

Then, inside your css, you can select your desired column with css attribute selector (www.w3.org/TR/selectors/#attribute-selectors) just like that:

[data-id="name"] {
    width: 200px;
}

Of course, you need to fine-grain your selections.

アバター
破棄

I don't believe custom css works in tree view. Can anyone confirm this?

tim: got it working?

thanks mate... normal classes didn't work and I was loosing hope that this is even possible.

最善の回答

The answer of Pedro JPG Work in odoo V16




Is Working

アバター
破棄
最善の回答

After a lot of searching I found a solution...I put it in my comments



アバター
破棄

After a lot of searching I found a solution... with the width attribute with xpath:
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="width" >170px</attribute>.
</xpath>

最善の回答

What works for me in v14 is doing it like this: style="width: 50px !important;"

But this only works on one2many or many2many field in form view.

アバター
破棄
関連投稿 返信 ビュー 活動
3
4月 25
3493
3
9月 23
8608
1
9月 22
2925
1
6月 22
11713
3
3月 20
10310