summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-08-16 14:02:56 +0000
committerNicolas Martinelli <nim@odoo.com>2019-08-16 14:04:03 +0000
commit57fef7c11cea206da4c4919781405913ba1d568f (patch)
treea479625541b6300cdb25a531e73bc8bd778d2fae
parenta32aa05a6bc912d53e0bfe3ef0946009c2a28f2a (diff)
[FIX] survey: certificate of failure
- Take a quizz survey, and fail it - Go to Answers - Print the Certification Even if the quizz was failed, the certification can be printed. There is no option to prevent printing a PDF, therefore we need to print a different template. opw-2049481 closes odoo/odoo#35769 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
-rw-r--r--addons/survey/views/survey_report_templates.xml7
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/survey/views/survey_report_templates.xml b/addons/survey/views/survey_report_templates.xml
index 55b209079f7..df969747027 100644
--- a/addons/survey/views/survey_report_templates.xml
+++ b/addons/survey/views/survey_report_templates.xml
@@ -15,12 +15,15 @@
<h2>
<span t-esc="user_input.partner_id.name or user_input.email"/>
</h2>
- <p>Successfully achieved</p>
+ <!-- You should not print a certificate if failed :) -->
+ <p t-if="user_input.quizz_passed">Successfully achieved</p>
+ <p t-if="not user_input.quizz_passed">Successfully failed</p>
<h3>
<span t-field="user_input.survey_id.display_name"/>
</h3>
<p>
- <strong>Date of Certification:</strong>
+ <strong t-if="user_input.quizz_passed">Date of Certification:</strong>
+ <strong t-if="not user_input.quizz_passed">Date of Failure:</strong>
<span t-field="user_input.create_date"/>
</p>
</div>