I wanted to change the column width of the columns in tree view. So far I have tried these solutions
Adding in the field tag: width="100px"
or width="15%%"
Adding in the field tag: style="width: 100px"
But Nothing seems to work for me.
I also looking for the same question, but seems like "style" doesn't work on tree view in Odoo. Seems like the only way is to define your own css class put the fixed width then assign the class on your field in your tree view.
Check this out:
xml
<tree string="Tree String" class="my_class">
<field name="my_field" />
</tree>
css
.my_class [data-id="my_field"] {
width: 1000px;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With