mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 21:29:11 +00:00
fix(patch): ignore links while deleting hr payroll doctypes (#31674)
This commit is contained in:
@@ -31,22 +31,22 @@ def execute():
|
|||||||
"Professional Tax Deductions",
|
"Professional Tax Deductions",
|
||||||
"Provident Fund 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(
|
doctypes = frappe.get_all(
|
||||||
"DocType", {"module": ("in", ["HR", "Payroll"]), "custom": 0}, pluck="name"
|
"DocType", {"module": ("in", ["HR", "Payroll"]), "custom": 0}, pluck="name"
|
||||||
)
|
)
|
||||||
for doctype in doctypes:
|
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 Slip Loan", ignore_missing=True, force=True)
|
||||||
frappe.delete_doc("DocType", "Salary Component Account", ignore_missing=True)
|
frappe.delete_doc("DocType", "Salary Component Account", ignore_missing=True, force=True)
|
||||||
|
|
||||||
notifications = frappe.get_all(
|
notifications = frappe.get_all(
|
||||||
"Notification", {"module": ("in", ["HR", "Payroll"]), "is_standard": 1}, pluck="name"
|
"Notification", {"module": ("in", ["HR", "Payroll"]), "is_standard": 1}, pluck="name"
|
||||||
)
|
)
|
||||||
for notifcation in notifications:
|
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)
|
frappe.delete_doc("User Type", "Employee Self Service", ignore_missing=True, force=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user