Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
2992 Weergaven

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
Annuleer
Auteur Beste antwoord

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
Annuleer
Beste antwoord

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
Annuleer
Auteur

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

Gerelateerde posts Antwoorden Weergaven Activiteit
3
mrt. 24
4040
1
nov. 23
1855
3
aug. 25
2731
1
mei 25
2692
1
apr. 25
3682