Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
4240 Prikazi

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
Avatar
Opusti
Avtor

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

Related Posts Odgovori Prikazi Aktivnost
1
dec. 19
3442
3
mar. 25
27793
1
dec. 17
6458
2
mar. 16
29655
0
mar. 15
4915