mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
Merge pull request #52712 from mihir-kandoi/gh52710
fix: addresses portal
This commit is contained in:
@@ -270,7 +270,7 @@ standard_portal_menu_items = [
|
|||||||
"role": "Customer",
|
"role": "Customer",
|
||||||
},
|
},
|
||||||
{"title": "Issues", "route": "/issues", "reference_doctype": "Issue", "role": "Customer"},
|
{"title": "Issues", "route": "/issues", "reference_doctype": "Issue", "role": "Customer"},
|
||||||
{"title": "Addresses", "route": "/addresses", "reference_doctype": "Address"},
|
{"title": "Addresses", "route": "/addresses", "reference_doctype": "Address", "role": "Customer"},
|
||||||
{
|
{
|
||||||
"title": "Timesheets",
|
"title": "Timesheets",
|
||||||
"route": "/timesheets",
|
"route": "/timesheets",
|
||||||
|
|||||||
@@ -465,4 +465,5 @@ erpnext.patches.v16_0.set_ordered_qty_in_quotation_item
|
|||||||
erpnext.patches.v16_0.update_company_custom_field_in_bin
|
erpnext.patches.v16_0.update_company_custom_field_in_bin
|
||||||
erpnext.patches.v15_0.replace_http_with_https_in_sales_partner
|
erpnext.patches.v15_0.replace_http_with_https_in_sales_partner
|
||||||
erpnext.patches.v16_0.migrate_asset_type_checkboxes_to_select
|
erpnext.patches.v16_0.migrate_asset_type_checkboxes_to_select
|
||||||
erpnext.patches.v15_0.delete_quotation_lost_record_detail
|
erpnext.patches.v15_0.delete_quotation_lost_record_detail
|
||||||
|
erpnext.patches.v16_0.add_portal_redirects
|
||||||
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