summaryrefslogtreecommitdiff
path: root/addons/gamification/data
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2018-11-02 14:54:17 +0000
committerMartin Trigaux <mat@odoo.com>2018-11-02 15:41:00 +0000
commit2b4c1f3a45b08cc92206a460aa1b2b1fffad37d7 (patch)
treea3e1447d22366f949919b1af33f5bc168b566a17 /addons/gamification/data
parent079a3b602bf26b54d11532b29d28d41e310a8786 (diff)
[FIX] gamification: correct mail template on small challenges
A challenge with less than 3 participants was failing with a key error The challenge line has only one 'goal' result per participant As the template is set in a noupdate, even a module update does not fix the bug Generate fake goals that will be displayed in the top 3, e.g.: 1 Bob $100 42% 2 Alice $50 21% 3 0 0% closes odoo/odoo#28363
Diffstat (limited to 'addons/gamification/data')
-rw-r--r--addons/gamification/data/goal_base.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml
index 80018820414..e26a64765f0 100644
--- a/addons/gamification/data/goal_base.xml
+++ b/addons/gamification/data/goal_base.xml
@@ -113,7 +113,7 @@ Thank you,
<tr><td style="padding:0 30px;">
<table cellspacing="0" cellpadding="0" width="100%" style="table-layout: fixed;">
<tr>
- % set top_goals = [line['goals'][1], line['goals'][0], line['goals'][2]]
+ % set top_goals = line['goals'][:3]
% for goal in top_goals:
<td align="center" style="width:32%;">
% if loop.index == 1: