Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
4270 Переглядів

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
3461
3
бер. 25
27832
1
груд. 17
6482
2
бер. 16
29717
0
бер. 15
4924