From 7b0e5661c6e0182f783792730288b7f14b038c9a Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Fri, 22 Jul 2022 12:46:59 +0530 Subject: [PATCH] fix(patch): ignore links while deleting hr payroll doctypes (#31674) --- erpnext/patches/v14_0/remove_hr_and_payroll_modules.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 259b1112f7..4d01fcb421 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 @@ 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)