Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
3113 Переглядів

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)]}])

Аватар
Відмінити
Автор Найкраща відповідь

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

Аватар
Відмінити
Найкраща відповідь

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 }])

Аватар
Відмінити
Автор

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 Відповіді Переглядів Дія
3
бер. 24
4178
1
лист. 23
1936
5
вер. 25
20554
3
серп. 25
2965
1
трав. 25
2847