代码之家  ›  专栏  ›  技术社区  ›  Ancient

奥多-我们如何显示多级记录

  •  0
  • Ancient  · 技术社区  · 7 年前

    我想展示奥多的多级记录。如果我们有这样的关系

    1-customer have many products and each product have a category 
    

    customer fields ......
    <field name="product.category" />
    

    我可以这样做吗?

    1 回复  |  直到 7 年前
        1
  •  0
  •   Sudhanshu Gupta    7 年前

    如果要在多个树状视图中显示产品类别,可以尝试以下操作:

    <field name='arch' type='xml>
      <form string='Customer'>
        <field name='product_ids'>
    
          <!-- Tree view shown in the form -->
          <tree name='Product Tree View'>
            <field name='name'/>
            <field name='category_id'/>
          </tree>
        </field>
      </form>
    </field>