[enhancement] configurable portal menu;
diff --git a/erpnext/config/website.py b/erpnext/config/website.py
index 45fad66..5f77d9f 100644
--- a/erpnext/config/website.py
+++ b/erpnext/config/website.py
@@ -3,8 +3,7 @@
def get_data():
return [
{
- "label": _("Shopping Cart"),
- "icon": "icon-wrench",
+ "label": _("Portal"),
"items": [
{
"type": "doctype",
diff --git a/erpnext/controllers/website_list_for_contact.py b/erpnext/controllers/website_list_for_contact.py
index 7b934e7..4bf8da0 100644
--- a/erpnext/controllers/website_list_for_contact.py
+++ b/erpnext/controllers/website_list_for_contact.py
@@ -34,7 +34,6 @@
key, parties = get_party_details(customers, suppliers)
if doctype == 'Request for Quotation':
- if key == 'customer': frappe.throw(_("Not Permitted"), frappe.PermissionError)
return rfq_transaction_list(parties_doctype, doctype, parties, limit_start, limit_page_length)
filters.append((doctype, key, "in", parties))
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 3799565..b2351ac 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -81,6 +81,16 @@
{"from_route": "/jobs", "to_route": "Job Opening"},
]
+portal_menu_items = [
+ {"title": _("Projects"), "route": "project", "reference_doctype": "Project"},
+ {"title": _("Request for Quotations"), "route": "rfq", "reference_doctype": "Request for Quotation"},
+ {"title": _("Orders"), "route": "orders", "reference_doctype": "Sales Order"},
+ {"title": _("Invoices"), "route": "invoices", "reference_doctype": "Sales Invoice"},
+ {"title": _("Shipments"), "route": "shipments", "reference_doctype": "Delivery Note"},
+ {"title": _("Issues"), "route": "issues", "reference_doctype": "Issue"},
+ {"title": _("Addresses"), "route": "addresses", "reference_doctype": "Address"}
+]
+
has_website_permission = {
"Sales Order": "erpnext.controllers.website_list_for_contact.has_website_permission",
"Sales Invoice": "erpnext.controllers.website_list_for_contact.has_website_permission",
diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py
index 6a5c3f5..1402168 100644
--- a/erpnext/setup/install.py
+++ b/erpnext/setup/install.py
@@ -55,4 +55,3 @@
pass
frappe.db.set_default("date_format", "dd-mm-yyyy")
-
diff --git a/erpnext/shopping_cart/utils.py b/erpnext/shopping_cart/utils.py
index 7cd269d..50ce5cf 100644
--- a/erpnext/shopping_cart/utils.py
+++ b/erpnext/shopping_cart/utils.py
@@ -4,7 +4,6 @@
from __future__ import unicode_literals
import frappe
-from frappe import _
import frappe.defaults
from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings import is_cart_enabled
@@ -30,29 +29,6 @@
cart_enabled = is_cart_enabled()
context["shopping_cart_enabled"] = cart_enabled
-def update_my_account_context(context):
- check_user_role, parties = check_customer_or_supplier()
-
- if check_user_role == 'Supplier':
- get_supplier_context(context)
- else:
- get_customer_context(context)
-
-def get_supplier_context(context):
- context["my_account_list"].extend([
- {"label": _("Request for Quotations"), "url": "rfq"},
- ])
-
-def get_customer_context(context):
- context["my_account_list"].extend([
- {"label": _("Projects"), "url": "project"},
- {"label": _("Orders"), "url": "orders"},
- {"label": _("Invoices"), "url": "invoices"},
- {"label": _("Shipments"), "url": "shipments"},
- {"label": _("Issues"), "url": "issues"},
- {"label": _("Addresses"), "url": "addresses"}
- ])
-
def check_customer_or_supplier():
if frappe.session.user:
contacts = frappe.get_all("Contact", fields=["customer", "supplier", "email_id"],