fix(patch): ignore links while deleting hr payroll doctypes (#31674)
diff --git a/erpnext/patches/v14_0/remove_hr_and_payroll_modules.py b/erpnext/patches/v14_0/remove_hr_and_payroll_modules.py
index 259b111..4d01fcb 100644
--- a/erpnext/patches/v14_0/remove_hr_and_payroll_modules.py
+++ b/erpnext/patches/v14_0/remove_hr_and_payroll_modules.py
@@ -31,22 +31,22 @@
"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)