跳至内容
菜单
此问题已终结
3396 查看

Good day people,


So I have a case where, I have a customer called Thomas TT LTD and the child contact is Bobo, Lex, and Tommy, the customer field is valued with Thomas TT LTD. I need to show the child contact on the crm.lead and also be able to add more child through this model. So basically it's like adding a function like Contact & Address notebook on res.partner but it's Contact & Address on crm.lead haha. Is there a way to do that? Thank you for the help :D

形象
丢弃

All you need to do is to delare a related field in crm.lead model.

child_ids = fields.M2M(related='partner_id.child_ids', .... )

In crm.lead, if you add a child, it will automatically be added to partner childs too and vice versa.

相关帖文 回复 查看 活动
2
6月 25
1590
1
9月 24
3550
1
8月 24
1793
1
8月 24
2069
0
8月 24
252