[FIX] gamification: fix wrong condition in template

How to reproduce
=================

Give a badge to an employee, when checking the sent mail, The image and
description of the badge is nowhere to be seens.

Those fields don't display because the description contains P html tags.
The presence of the removed `t-if` is the main cause of the issue.
Adding a `not` to the condition solves the issue. This not was lost
during the Jinja -> Qweb translation (commit 68182ba)

opw-3099419

closes odoo/odoo#114259

X-original-commit: c90add64f91667d5c9f2294029aa674b19981278
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Jordan D. (Joda)
2023-03-02 22:57:47 +01:00
parent 57b7802bf7
commit 27fb535d9b
2 changed files with 2 additions and 2 deletions
@@ -35,7 +35,7 @@
<div>
Congratulations <t t-out="object.user_id.name or ''"></t> !<br/>
You just received badge <strong t-out="object.badge_id.name or ''"></strong> !<br/>
<table t-if="is_html_empty(object.badge_id.description)" cellspacing="0" cellpadding="0" border="0" style="width: 560px; margin-top: 5px;">
<table t-if="not is_html_empty(object.badge_id.description)" cellspacing="0" cellpadding="0" border="0" style="width: 560px; margin-top: 5px;">
<tbody><tr>
<td valign="center">
<img t-attf-src="/web/image/gamification.badge/{{ object.badge_id.id }}/image_128/80x80" style="padding: 0px; margin: 0px; height: auto; width: 80px;" t-att-alt="user.company_id.name"/>
+1 -1
View File
@@ -190,7 +190,7 @@ msgid ""
" <div>\n"
" Congratulations <t t-out=\"object.user_id.name or ''\"/> !<br/>\n"
" You just received badge <strong t-out=\"object.badge_id.name or ''\"/> !<br/>\n"
" <table t-if=\"is_html_empty(object.badge_id.description)\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width: 560px; margin-top: 5px;\">\n"
" <table t-if=\"not is_html_empty(object.badge_id.description)\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width: 560px; margin-top: 5px;\">\n"
" <tbody><tr>\n"
" <td valign=\"center\">\n"
" <img t-attf-src=\"/web/image/gamification.badge/{{ object.badge_id.id }}/image_128/80x80\" style=\"padding: 0px; margin: 0px; height: auto; width: 80px;\" t-att-alt=\"user.company_id.name\"/>\n"