コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3147 ビュー

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

関連投稿 返信 ビュー 活動
3
3月 24
4237
1
11月 23
1963
5
9月 25
20804
3
8月 25
2996
1
5月 25
2872