Skip to Content
मेन्यू
This question has been flagged
2 Replies
2921 Views

Hi, via api I'm trying to assign employee_ids = [2898] to the res.partner with id = 2719. I'm not getting any errors but the value isn't being assigned. How come?

models.execute_kw(db, uid, password, 'res.partner', 'write', [[2719], {'employee_ids': [(4, 2898)]}])

Avatar
Discard
Author Best Answer

Unfortunately, if hr_employee_id is not entered in employee_ids, in the res.partner view the smart button with the associated employees is not displayed

Avatar
Discard
Best Answer

You can do it in opposite way, you can update address_home_id field in hr.employee to the partner (the partner type should be private)

models.execute_kw(db, uid, password, 'hr.employee', 'write', [[2898], {'address_home_id ': 2719 }])

Avatar
Discard
Author

Unfortunately, if hr_employee_id is not entered in employee_ids, in the res.partner view the smart button with the associated employees is not displayed

Related Posts Replies Views Activity
3
मार्च 24
3928
1
नव॰ 23
1797
3
अग॰ 25
2574
1
मई 25
2616
1
अप्रैल 25
3596