class

要设置在所生成元素上的 HTML 类。

样式使用 Bootstrap 框架和 UI 图标。常用的 Odoo 类包括:

  • oe_inline:避免字段后出现通常的换行,并限制其跨度;

  • oe_left、oe_right:将元素 floats (浮动)到相应方向;

  • oe_read_only、oe_edit_only:仅在相应的表单模式下显示该元素;

  • oe_avatar:对于图片字段,将图片以“头像”形式显示(最大 90x90 的正方形);

  • oe_stat_button:定义一种特定渲染方式,用于动态显示信息,同时可点击以触发某个动作。

示例

<field name="fname" class="oe_inline oe_left oe_avatar"/>

示例

<button type="object" name="ACTION" class="oe_stat_button" icon="FONT_AWESOME" help="HELP">
   <div class="o_field_widget o_stat_info">
      <span class="o_stat_value"><FIELD/></span>
      <span class="o_stat_text">TEXT</span>
   </div>
</button>
要求

可选

type

str

默认

''