[FIX] Dirty fix for links sent by email
bzr revid: rim@openerp.com-20140410141352-tb9rwbvawuy2kwc4
This commit is contained in:
parent
89a60326da
commit
ea69de5114
|
@ -26,6 +26,7 @@ from datetime import datetime
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import uuid
|
import uuid
|
||||||
|
import urlparse
|
||||||
|
|
||||||
emails_split = re.compile(r"[;,\n\r]+")
|
emails_split = re.compile(r"[;,\n\r]+")
|
||||||
|
|
||||||
|
@ -137,8 +138,12 @@ class survey_mail_compose_message(osv.TransientModel):
|
||||||
""" Create one mail by recipients and replace __URL__ by link with identification token """
|
""" Create one mail by recipients and replace __URL__ by link with identification token """
|
||||||
#set url
|
#set url
|
||||||
url = wizard.survey_id.public_url
|
url = wizard.survey_id.public_url
|
||||||
|
|
||||||
|
url = urlparse.urlparse(url).path[1:] # dirty hack to avoid incorrect urls
|
||||||
|
|
||||||
if token:
|
if token:
|
||||||
url = url + '/' + token
|
url = url + '/' + token
|
||||||
|
|
||||||
# post the message
|
# post the message
|
||||||
values = {
|
values = {
|
||||||
'model': None,
|
'model': None,
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<field invisible="context.get('survey_resent_token')" name="multi_email" placeholder="Add list of email of recipients (will not converted in partner), separated by commas, semicolons or newline..." on_change="onchange_multi_email(multi_email)" no_resize="1" />
|
<field invisible="context.get('survey_resent_token')" name="multi_email" placeholder="Add list of email of recipients (will not converted in partner), separated by commas, semicolons or newline..." on_change="onchange_multi_email(multi_email)" no_resize="1" />
|
||||||
<field name="subject" placeholder="Subject..."/>
|
<field name="subject" placeholder="Subject..."/>
|
||||||
</group>
|
</group>
|
||||||
<field name="body" help="__URL__ will be automatically transformed into web address (public or private, depending on your choice). You can click on 'Show Source' button to see __URL__ in the link tag on the email template."/>
|
<field name="body" />
|
||||||
<group col="2">
|
<group col="2">
|
||||||
<div>
|
<div>
|
||||||
<label for="attachment_ids" />
|
<label for="attachment_ids" />
|
||||||
|
|
Loading…
Reference in New Issue