Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
3157 Näkymät

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
Hylkää
Tekijä Paras vastaus

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
Hylkää
Paras vastaus

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
Hylkää
Tekijä

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

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
3
maalisk. 24
4262
1
marrask. 23
1970
5
syysk. 25
20858
3
elok. 25
3006
1
toukok. 25
2887