تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
3040 أدوات العرض

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
مارس 24
4118
1
نوفمبر 23
1912
3
أغسطس 25
2855
1
مايو 25
2784
1
أبريل 25
3752