【问题标题】:OpenERP view - one column for fieldOpenERP 视图 - 字段一栏
【发布时间】:2014-02-25 09:29:32
【问题描述】:

我需要创建一个视图,其中一个组中的字段没有标签,而另一组中的字段和标签。因此,我需要将字段组分为三列 - 一列用于没有标签的字段,两列用于带有标签的组。所以它应该看起来像这样:

|col1|col2|col3|
field lb   field  
field lb   field

但我明白了:

|col1|col2|col3|col4
field      lb  field  
field      lb  field

当我尝试这个时:

<group colspan="3" col="3">
  <group String="L" colspan="1" col="1">
    <field name="breath_ausc_l_norm" nolabel="1"/>
    <field name="breath_ausc_l_wet" nolabel="1"/>
    <field name="breath_ausc_l_dry" nolabel="1"/>
    <field name="breath_ausc_l_bron" nolabel="1"/>
    <field name="breath_ausc_l_weak" nolabel="1"/>
    <field name="breath_ausc_l_not" nolabel="1"/>
  </group>
  <group String="R" col="2" colspan="2">
    <field name="breath_ausc_r_norm"/>
    <field name="breath_ausc_r_wet"/>
    <field name="breath_ausc_r_dry"/>
    <field name="breath_ausc_r_bron"/>
    <field name="breath_ausc_r_weak"/>
    <field name="breath_ausc_r_not"/>
  </group>
</group>

【问题讨论】:

  • 哪个 openerp 版本?
  • OpenERP 版本 - 7.0

标签: xml view openerp multiple-columns


【解决方案1】:

试试这个:

<group colspan="4" col="4">
  <group String="L" colspan="1">
    <div class="oe_inline">
      <field name="breath_ausc_l_norm" nolabel="1"/>
      <field name="breath_ausc_l_wet" nolabel="1"/>
      <field name="breath_ausc_l_dry" nolabel="1"/>
      <field name="breath_ausc_l_bron" nolabel="1"/>
      <field name="breath_ausc_l_weak" nolabel="1"/>
      <field name="breath_ausc_l_not" nolabel="1"/>
    </div>
  </group>
  <group String="R" colspan="3">
    <field name="breath_ausc_r_norm"/>
    <field name="breath_ausc_r_wet"/>
    <field name="breath_ausc_r_dry"/>
    <field name="breath_ausc_r_bron"/>
    <field name="breath_ausc_r_weak"/>
    <field name="breath_ausc_r_not"/>
  </group>
</group>

也许它在每个字段上都没有 div 和 class="oe_inline" 也可以工作

【讨论】:

  • 如果我尝试这个,它会水平对齐字段。第一组字段(没有标签)排成一行,而不是一个接一个的列。
猜你喜欢
  • 2014-02-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多