İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
2924 Görünümler

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
Vazgeç
Üretici En İyi Yanıt

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Mar 24
3937
1
Kas 23
1802
3
Ağu 25
2596
1
May 25
2633
1
Nis 25
3621