Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
2982 Prikazi

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
Opusti
Avtor 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
Opusti
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
Opusti
Avtor

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 Odgovori Prikazi Aktivnost
3
mar. 24
4035
1
nov. 23
1853
3
avg. 25
2723
1
maj 25
2688
1
apr. 25
3675