odoo form view套tree

weixin_34162695發表於2018-04-12
1515427-4c7b2423f4828855.png
按規矩先上圖

效果實現: 只要將欄位型別設定成One2many即可

partner_ids = fields.One2many(
        comodel_name='dms_distribution.partnerinfo',
        inverse_name='partner_id',
        string=u'客戶資訊', required=False
    )

xml程式碼:

<group sting="客戶列表">
    <field name="partner_ids" nolabel="1">
          <tree string="partner ids list" editable="bottom">
            <field name="partner_id"/>
            <field name="load_sequence"/>
          </tree>
    </field>
</group>

相關文章