[fix] get_url_to_form should be relative. URLs are expanded to during email sending.
This commit is contained in:
parent
08425fd690
commit
a02e5c810d
1 changed files with 2 additions and 5 deletions
|
|
@ -821,13 +821,10 @@ def get_url(uri=None, full_address=False):
|
|||
|
||||
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
|
||||
|
||||
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"):
|
||||
for key in d:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue