fix(patch): ignore links while deleting hr payroll doctypes (#31674)
This commit is contained in:
parent
6883fc95ae
commit
7b0e5661c6
@ -31,22 +31,22 @@ def execute():
|
||||
"Professional Tax Deductions",
|
||||
"Provident Fund Deductions",
|
||||
]:
|
||||
frappe.delete_doc("Report", report, ignore_missing=True)
|
||||
frappe.delete_doc("Report", report, ignore_missing=True, force=True)
|
||||
|
||||
doctypes = frappe.get_all(
|
||||
"DocType", {"module": ("in", ["HR", "Payroll"]), "custom": 0}, pluck="name"
|
||||
)
|
||||
for doctype in doctypes:
|
||||
frappe.delete_doc("DocType", doctype, ignore_missing=True)
|
||||
frappe.delete_doc("DocType", doctype, ignore_missing=True, force=True)
|
||||
|
||||
frappe.delete_doc("DocType", "Salary Slip Loan", ignore_missing=True)
|
||||
frappe.delete_doc("DocType", "Salary Component Account", ignore_missing=True)
|
||||
frappe.delete_doc("DocType", "Salary Slip Loan", ignore_missing=True, force=True)
|
||||
frappe.delete_doc("DocType", "Salary Component Account", ignore_missing=True, force=True)
|
||||
|
||||
notifications = frappe.get_all(
|
||||
"Notification", {"module": ("in", ["HR", "Payroll"]), "is_standard": 1}, pluck="name"
|
||||
)
|
||||
for notifcation in notifications:
|
||||
frappe.delete_doc("Notification", notifcation, ignore_missing=True)
|
||||
frappe.delete_doc("Notification", notifcation, ignore_missing=True, force=True)
|
||||
|
||||
frappe.delete_doc("User Type", "Employee Self Service", ignore_missing=True, force=True)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user