fix(RFQ): link to supplier portal

(cherry picked from commit fd91f2c2e0)
This commit is contained in:
barredterra
2023-08-08 12:31:01 +02:00
committed by Mergify
parent 00b9df0bc5
commit eb2f68ec98

View File

@@ -116,7 +116,10 @@ class RequestforQuotation(BuyingController):
route = frappe.db.get_value(
"Portal Menu Item", {"reference_doctype": "Request for Quotation"}, ["route"]
)
return get_url("/app/{0}/".format(route) + self.name)
if not route:
frappe.throw(_("Please add Request for Quotation to the sidebar in Portal Settings."))
return get_url(f"{route}/{self.name}")
def update_supplier_part_no(self, supplier):
self.vendor = supplier