如何在树视图/看板视图odoo中显示记录名称而不是one2many字段的记录计数

时间:2016-12-28 11:08:41

标签: javascript treeview odoo-8 odoo-9 openerp-8

enter image description here我在另一个内部有两个one2many字段,o2m字段记录显示在外部o2m字段中的数字计数中,如(3record)。 如何在树视图中显示记录名称而不是one2many字段的记录计数

1 个答案:

答案 0 :(得分:0)

 <tree string="Customer Segment(Industry)" >
      <field name="name" string="Customer Segment"/>
      <field name="industry_image" widget="image" />
      <field name="schedule_list_ids"/>
 </tree>

这将显示如下

Showing record name instead of count- tree view

在表单视图中,我喜欢以下

           <form string="Industries List">
                <sheet>
                   <group>
                         <field name="name" style="width:30%%" string="Customer Segment"/>
                         <field name="industry_image" widget="image" width="100px" height="100px" />
                         <field name="schedule_list_ids"/>
                   </group>
                </sheet>
            </form>

Showing record name instead of count- formview