From 152c6be209425c1682c8f2ae7d6510cca95c75e5 Mon Sep 17 00:00:00 2001 From: DeeMysterio Date: Mon, 23 Dec 2019 19:02:29 +0530 Subject: [PATCH] fix(employee onboarding): stop showing irrelevant job offer links for a job applicant (#20053) --- .../hr/doctype/employee_onboarding/employee_onboarding.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/hr/doctype/employee_onboarding/employee_onboarding.js b/erpnext/hr/doctype/employee_onboarding/employee_onboarding.js index 996dcdf848..c1285675e5 100644 --- a/erpnext/hr/doctype/employee_onboarding/employee_onboarding.js +++ b/erpnext/hr/doctype/employee_onboarding/employee_onboarding.js @@ -7,6 +7,14 @@ frappe.ui.form.on('Employee Onboarding', { frm.add_fetch("employee_onboarding_template", "department", "department"); frm.add_fetch("employee_onboarding_template", "designation", "designation"); frm.add_fetch("employee_onboarding_template", "employee_grade", "employee_grade"); + + frm.set_query('job_offer', function () { + return { + filters: { + 'job_applicant': frm.doc.job_applicant + } + }; + }); }, refresh: function(frm) {