mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
* fix: addresses portal
(cherry picked from commit e317ab1479)
# Conflicts:
# erpnext/patches.txt
* chore: resolve conflicts
---------
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
14
erpnext/patches/v16_0/add_portal_redirects.py
Normal file
14
erpnext/patches/v16_0/add_portal_redirects.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
if frappe.db.exists("Portal Menu Item", {"route": "/addresses", "reference_doctype": "Address"}) and (
|
||||
doc := frappe.get_doc("Portal Menu Item", {"route": "/addresses", "reference_doctype": "Address"})
|
||||
):
|
||||
doc.role = "Customer"
|
||||
doc.save()
|
||||
|
||||
website_settings = frappe.get_single("Website Settings")
|
||||
website_settings.append("route_redirects", {"source": "addresses", "target": "address/list"})
|
||||
website_settings.append("route_redirects", {"source": "projects", "target": "project"})
|
||||
website_settings.save()
|
||||
Reference in New Issue
Block a user