تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4827 أدوات العرض

I have a module with:

parent_id = fields.Many2one('res.partner')
parent_child_ids = fields.Many2many(comodel_name='res.partner',
                             relation='res_partner_rel',
                             column1='child_ids',
                             column2='partner_id')

What I expect:

I added the parent_id in the partner form where in the user can customer's parent. What I want to achieve is, when I select a parent company for a particular customer - the customer will be automatically added to child_ids of the parent company (override create and write method). And when I select child_ids in the parent company, the customer's parent id field will be updated to parent company id. How to achieve that?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
4610
0
نوفمبر 23
1333
3
فبراير 18
3959
0
مارس 16
3150
1
مارس 15
4006