Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
3033 Представления

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
4113
1
нояб. 23
1905
3
авг. 25
2852
1
мая 25
2782
1
апр. 25
3749