mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 20:59:11 +00:00
Added patch
This commit is contained in:
@@ -322,3 +322,4 @@ erpnext.patches.v7_0.repost_gle_for_pos_sales_return
|
|||||||
erpnext.patches.v7_0.update_missing_employee_in_timesheet
|
erpnext.patches.v7_0.update_missing_employee_in_timesheet
|
||||||
erpnext.patches.v7_0.update_status_for_timesheet
|
erpnext.patches.v7_0.update_status_for_timesheet
|
||||||
erpnext.patches.v7_0.set_party_name_in_payment_entry
|
erpnext.patches.v7_0.set_party_name_in_payment_entry
|
||||||
|
erpnext.patches.v7_1.set_student_guardian
|
||||||
|
|||||||
13
erpnext/patches/v7_1/set_student_guardian.py
Normal file
13
erpnext/patches/v7_1/set_student_guardian.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
if frappe.db.exists("DocType", "Guardian"):
|
||||||
|
frappe.reload_doc("schools", "doctype", "student")
|
||||||
|
frappe.reload_doc("schools", "doctype", "student_guardian")
|
||||||
|
guardian = frappe.get_list("Guardian", fields=["name", "student"])
|
||||||
|
for d in guardian:
|
||||||
|
if d.student:
|
||||||
|
student = frappe.get_doc("Student", d.student)
|
||||||
|
if student:
|
||||||
|
student.append("guardians", {"guardian": d.name})
|
||||||
|
student.save()
|
||||||
Reference in New Issue
Block a user