跳至內容
選單
此問題已被標幟
4283 瀏覽次數

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.

相關帖文 回覆 瀏覽次數 活動
1
12月 19
3470
3
3月 25
27869
1
12月 17
6503
2
3月 16
29746
0
3月 15
4942