Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4304 มุมมอง

How would I add a new res.partner Hierarchical relationships? I tried:

```

class ResPartner(models.Model):
    _inherit = "res.partner"
    _parent_name = 'father'
    father = fields.Many2one('res.partner', string='father', index=True)
    kids = fields.One2many('res.partner', 'father', string="kids", context={'active_test': False})

```
but it doesn't seem to work.
- Is there a limit in the number of Hierarchical relationships on a same model (a parent / child relationship already exist in res_partner)?
TIA
อวตาร
ละทิ้ง
ผู้เขียน

I got rid of the error by updating the base module.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 19
3516
OnChange event of o2m and m2m แก้ไขแล้ว
3
มี.ค. 25
27926
1
ธ.ค. 17
6551
2
มี.ค. 16
29795
0
มี.ค. 15
4983