Skip to content
Permalink
Browse files

[FIX] survey: get certification of failure back

PURPOSE

As Certification PDF can be called on failed user input, generate a
certification of failure in that case.

SPECIFICATIONS

In the survey_report_templates.xml, when user_input.quizz_passed is
false, a certification of failure can be generated.

This commit is actually about applying again 57fef7c that has been lost
while performing major cleaning in survey templates.

LINKS

PR #42811
Task ID 2148449

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
  • Loading branch information
yhu-odoo authored and tde-banana-odoo committed Dec 6, 2019
1 parent 65c8fac commit 6206e0e6213be14a977db028b8f4dc4f755bf11c
Showing with 21 additions and 11 deletions.
  1. +21 −11 addons/survey/views/survey_report_templates.xml
@@ -14,12 +14,17 @@
</div>

<div class="certification-bottom">
<h5 class="user-name-label">This Certificate is Presented to</h5>
<div class="user-name" t-esc="user_input.partner_id.name or user_input.email"/>
<div t-if="user_input.quizz_passed">
<h5 class="user-name-label">This Certificate is Presented to</h5>
<div class="user-name" t-esc="user_input.partner_id.name or user_input.email"/>

<div class="certification-description">
<span t-field="user_input.survey_id.create_uid.company_id.display_name"/> is proud to award this certificate to
<span t-esc="user_input.partner_id.name or user_input.email"/> for gratuating from <span t-field="user_input.survey_id.display_name"/>.
<div class="certification-description">
<span t-field="user_input.survey_id.create_uid.company_id.display_name"/> is proud to award this certificate to
<span t-esc="user_input.partner_id.name or user_input.email"/> for gratuating from <span t-field="user_input.survey_id.display_name"/>.
</div>
</div>
<div t-else="">
<h5>Certification Failed</h5>
</div>

<div class="certification-bottom-group">
@@ -46,13 +51,18 @@
<div class="certification-name" t-field="user_input.survey_id.display_name"/>
<hr/>

<h5>This Certificate is Presented to</h5>
<div class="user-name" t-esc="user_input.partner_id.name or user_input.email"/>
<hr class="small"/>
<div t-if="user_input.quizz_passed">
<h5>This Certificate is Presented to</h5>
<div class="user-name" t-esc="user_input.partner_id.name or user_input.email"/>
<hr class="small"/>

<div class="certification-description">
<span t-field="user_input.survey_id.create_uid.company_id.display_name"/> is proud to award this certificate to
<span t-esc="user_input.partner_id.name or user_input.email"/> for graduating from <span t-field="user_input.survey_id.display_name"/>.
<div class="certification-description">
<span t-field="user_input.survey_id.create_uid.company_id.display_name"/> is proud to award this certificate to
<span t-esc="user_input.partner_id.name or user_input.email"/> for graduating from <span t-field="user_input.survey_id.display_name"/>.
</div>
</div>
<div t-else="">
<h5>Certification Failed</h5>
</div>

<div class="certification-date" t-field="user_input.create_date" t-options='{"widget": "date"}'/>

0 comments on commit 6206e0e

Please sign in to comment.
You can’t perform that action at this time.