Przeglądaj źródła

[fix] get_url_to_form should be relative. URLs are expanded to during email sending.

version-14
Anand Doshi 11 lat temu
rodzic
commit
a02e5c810d
1 zmienionych plików z 2 dodań i 5 usunięć
  1. +2
    -5
      frappe/utils/__init__.py

+ 2
- 5
frappe/utils/__init__.py Wyświetl plik

@@ -821,13 +821,10 @@ def get_url(uri=None, full_address=False):


return url return url


def get_url_to_form(doctype, name, base_url=None, label=None):
if not base_url:
base_url = get_url()

def get_url_to_form(doctype, name, label=None):
if not label: label = name if not label: label = name


return """<a href="%(base_url)s/desk#!Form/%(doctype)s/%(name)s">%(label)s</a>""" % locals()
return """<a href="/desk#!Form/%(doctype)s/%(name)s">%(label)s</a>""" % locals()


def encode_dict(d, encoding="utf-8"): def encode_dict(d, encoding="utf-8"):
for key in d: for key in d:


Ładowanie…
Anuluj
Zapisz