如何减少 Odoo V13 中字段标签的长度

How can I decrease the length of my field Label in Odoo V13

例如: 这是我的 XML 查看代码:

<record model="ir.ui.view" id="user_form" >
   <field name="name">User Form</field>
   <field name="model">user</field>
   <field name="arch" type="xml">
       <group>
           <field name="name"/>
           <field name="password"/>
           <field name="Active"/>
           <field name="power_of_using_the_complete_session"/>
       </group>
       <notebook>

在 UI 中,我看到 power of using the complete session 字段分为两行。我们如何将它扩展到 XML 视图中的单行?

我尝试使用 colspan,但它似乎没有用。

嗨,让我试着帮忙。

在xml中,您可以在字段中使用width属性来增加字段的宽度。

例如:

<field name="your_field_name" width="130"/>

其次,您可以使用一些 html 标签和属性来解决这个问题。

例如:

<div class="row">
    <label string="Field String" for="field_id" class="col-lg-5 o_light_label"/>
    <field name="you_field_name" id="field_id" class="oe_inline"/>             
</div>

在这里您要替换自定义标签的字段字符串并使用 col-lg-5

定义其长度