问题描述
在odoo 13中,我继承了树视图,并且希望增加视图的宽度。
我尝试在style = "width: 120px"
中使用<field>
,但是没有用。
click here to see the column to modify the width
解决方法
路易斯·克鲁兹(Luis De la Cruz)
解决方案不起作用
xml
<field width="100" />
或<field style="width: 100" />
或<field style="width:50 %%" />
xml
<field class="custom_class" /> ;
与css .custom_class { width: 1000px;}
xml :
<field name="custom_field" />
与css : [data-id="custom_field"]{width: 100px;}
解决方案,哪个工作:
xml :
<tree string="XYZ" class="custom_class"> <field name="custom_field" />
css :
.custom_class [data-id="custom_field"]{width: 1000px;}
因为class
attribute
在tree
标签上有效。
此外,您可以应用以下内容来增加column
的宽度
<field name="name" string=" Name "/>