fix:Mandatory field property failed to work based on the selection of field 'Group Based on' on 'Student Group' Page #20605

This commit is contained in:
jsukrut 2020-02-15 16:18:17 +05:30
parent c2c12dc82f
commit 3a6ca13b44

View File

@ -70,6 +70,16 @@ frappe.ui.form.on("Student Group", {
group_based_on: function(frm) {
if (frm.doc.group_based_on == "Batch") {
frm.doc.course = null;
frm.set_df_property('program', 'reqd', 1);
frm.set_df_property('course', 'reqd', 0);
}
else if (frm.doc.group_based_on == "Course") {
frm.set_df_property('program', 'reqd', 0);
frm.set_df_property('course', 'reqd', 1);
}
else if (frm.doc.group_based_on == "Activity") {
frm.set_df_property('program', 'reqd', 0);
frm.set_df_property('course', 'reqd', 0);
}
},