From 08fa7590ef6a543f13c283353486e2693790e0f5 Mon Sep 17 00:00:00 2001 From: sharmatripti <61048272+sharmatripti@users.noreply.github.com> Date: Wed, 26 Feb 2020 12:02:37 +0530 Subject: [PATCH] fix: Employee field should be filtered based on department on doctype Instructor (#20705) * Fix: Filtered Employee based on Department on Instructor doctype (#20598) * Fix: Syntax error (#20598) * Fix: Syntax error (#20598) * Fix: Syntax error (#20598) * Fix: Syntax error (#20598) * fix : Filtered Employee based on Department on Instructor doctype (#20704) --- erpnext/education/doctype/instructor/instructor.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/erpnext/education/doctype/instructor/instructor.js b/erpnext/education/doctype/instructor/instructor.js index 71e044bb70..69bd2cf008 100644 --- a/erpnext/education/doctype/instructor/instructor.js +++ b/erpnext/education/doctype/instructor/instructor.js @@ -12,7 +12,6 @@ frappe.ui.form.on("Instructor", { } }; }); - frm.set_query("department", "instructor_log", function() { return { "filters": { @@ -49,5 +48,12 @@ frappe.ui.form.on("Instructor", { frappe.set_route("List", "Assessment Plan"); }, __("Assessment Plan")); } + frm.set_query("employee", function(doc) { + return { + "filters": { + "department": doc.department, + } + }; + }); } -}); +}); \ No newline at end of file