fix: cannot delete pos page if linked with desk page (#22993)

* fix: cannot delete pos page if linked with desk page

* fix: replace pos page links with point-of-sale page

Co-authored-by: gavin <gavin18d@gmail.com>
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index aa7996e..6c58f2f 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -697,7 +697,7 @@
 execute:frappe.delete_doc("Report", "Department Analytics")
 execute:frappe.rename_doc("Desk Page", "Loan Management", "Loan", force=True)
 erpnext.patches.v12_0.update_uom_conversion_factor
-execute:frappe.delete_doc_if_exists("Page", "pos") #29-05-2020
+erpnext.patches.v13_0.replace_pos_page_with_point_of_sale_page
 erpnext.patches.v13_0.delete_old_purchase_reports
 erpnext.patches.v12_0.set_italian_import_supplier_invoice_permissions
 erpnext.patches.v13_0.update_subscription
diff --git a/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py b/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py
new file mode 100644
index 0000000..390e217
--- /dev/null
+++ b/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py
@@ -0,0 +1,6 @@
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+	if frappe.db.exists("Page", "point-of-sale"):
+		frappe.rename_doc("Page", "pos", "point-of-sale", 1, 1)
\ No newline at end of file