summaryrefslogtreecommitdiff
path: root/addons/survey/data/mail_template_data.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-01-24 10:19:09 +0000
committerThibault Delavallée <tde@odoo.com>2019-01-25 13:11:50 +0000
commitc801eecf23035d1b53eccc15ec29e6be970e3579 (patch)
treeea68c038b7f7ba392717db3cc0840394a2be7001 /addons/survey/data/mail_template_data.xml
parent970cb47f57c1c3216fc1cb9853c9a5539fb36fc8 (diff)
[IMP] survey: access survey through access tokens
Purpose of this commit is to use an access token to access survey instead of their ID. Routes are updated to use that token instead of the survey ID. Purpose is to have less discoverable routes and be able to control a bit more survey access even if it is not really a security parameter. Some renaming is performed to avoid confusion in terms. Survey token and answer token are now clearly labeled differently in the code to know which model we are working on. Some templates are updated to directly use the answer as base record to have access to token and test_entry fields instead of giving those parameter values directly in the controller. It makes some more diff but also allow easier edition and improvement in templates when having directly survey and answer record available. This commit is linked to task ID 1932508 and PR #30508.
Diffstat (limited to 'addons/survey/data/mail_template_data.xml')
-rw-r--r--addons/survey/data/mail_template_data.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/survey/data/mail_template_data.xml b/addons/survey/data/mail_template_data.xml
index 84d8ea69358..ededcfb9bcc 100644
--- a/addons/survey/data/mail_template_data.xml
+++ b/addons/survey/data/mail_template_data.xml
@@ -11,7 +11,7 @@
Dear ${object.partner_id.name or 'participant'}<br/><br/>
We are conducting a survey and your response would be appreciated.
<div style="margin: 16px 0px 16px 0px;">
- <a href="${('%s?token=%s' % (object.survey_id.public_url, object.token)) | safe}"
+ <a href="${('%s?answer_token=%s' % (object.survey_id.public_url, object.token)) | safe}"
style="background-color: #875A7B; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px; font-size:13px;">
Start Survey
</a>