Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4263 Lượt xem

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
Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 19
3460
3
thg 3 25
27818
1
thg 12 17
6473
2
thg 3 16
29708
0
thg 3 15
4922