commit | 377da583781ba4bc3bc024d23673d32048d9967c | [log] [tgz] |
---|---|---|
author | Neil Trini Lasrado <neil@frappe.io> | Tue Oct 18 18:11:52 2016 +0530 |
committer | Neil Trini Lasrado <neil@frappe.io> | Tue Oct 18 18:11:52 2016 +0530 |
tree | b6cdd98f23af13a6a8388621fb435ca5d3bb7dae | |
parent | 8b3dd8fdf2edae0984c812ff0d2cc49ec7bf4e4f [diff] |
Set Student Name in Program Enrollment
diff --git a/erpnext/schools/doctype/program_enrollment/program_enrollment.py b/erpnext/schools/doctype/program_enrollment/program_enrollment.py index a15a070..02c6fe7 100644 --- a/erpnext/schools/doctype/program_enrollment/program_enrollment.py +++ b/erpnext/schools/doctype/program_enrollment/program_enrollment.py
@@ -11,6 +11,8 @@ class ProgramEnrollment(Document): def validate(self): self.validate_duplication() + if not self.student_name: + self.student_name = frappe.db.get_value("Student", self.student, "title") def on_submit(self): self.update_student_joining_date()