From 71a3cf1dfc65ff83b48a6458c4a2126016c59a24 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 12 Nov 2014 17:11:01 +0530 Subject: [PATCH] link for website view in email --- .../core/doctype/communication/communication.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index 47546c221b..af98c0f076 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -167,14 +167,12 @@ def set_portal_link(sent_via, comm): footer = "" - if is_signup_enabled() and hasattr(sent_via, "get_portal_page"): - portal_page = sent_via.get_portal_page() - if portal_page: - is_valid_recipient = cstr(sent_via.get("email") or sent_via.get("email_id") or - sent_via.get("contact_email")) in comm.recipients - if is_valid_recipient: - url = "%s/%s?name=%s" % (get_url(), portal_page, urllib.quote(sent_via.name)) - footer = """ -

View this on our website

""" % url + if is_signup_enabled(): + is_valid_recipient = cstr(sent_via.get("email") or sent_via.get("email_id") or + sent_via.get("contact_email")) in comm.recipients + if is_valid_recipient: + url = "%s/%s/%s" % (get_url(), urllib.quote(sent_via.doctype), urllib.quote(sent_via.name)) + footer = """ +

View this on our website

""" % url return footer