summaryrefslogtreecommitdiff
path: root/addons/gamification
diff options
context:
space:
mode:
authorPedro M. Baeza <pedro.baeza@gmail.com>2018-09-20 13:08:50 +0200
committerOlivier Dony <odo@odoo.com>2018-10-03 17:48:14 +0200
commit1ad4d42f0b6da1677a5114c0b79a86b7be35577a (patch)
tree92f266fc1f196de1c2aa97666ca3dec97954146e /addons/gamification
parent1be50fdeafcd2b94f7b2f47d6e5bc4b6ebaceadd (diff)
[ADD] *: replace hardcoded data URIs with helper
- Add a method for generating an image data URI, and expose it in QWeb context - Fix reports, website templates or mail templates with data hardcoded data URIs, to use the helper (Python cases), or the existing kanban_image helper (for JS cases) This will gracefully handle SVG support in addition to classical image formats. Closes #26635
Diffstat (limited to 'addons/gamification')
-rw-r--r--addons/gamification/data/goal_base.xml5
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml
index 3552be22061..80018820414 100644
--- a/addons/gamification/data/goal_base.xml
+++ b/addons/gamification/data/goal_base.xml
@@ -142,9 +142,8 @@ Thank you,
<div style="height:${heightA}px;">
${extra_div | safe}
<div style="height:55px;">
- % set path = object.env['res.users'].browse(goal['user_id']).partner_id.image_small
- <img style="margin-bottom:5px;width:50px;height:50px;border-radius:50%;" src="data:image/jpeg;base64,${path}" alt="${goal['name']}"/>
- </div>
+ <img style="margin-bottom:5px;width:50px;height:50px;border-radius:50%;" t-att-src="image_data_uri(object.env['res.users'].browse(goal['user_id']).partner_id.image_small)" alt="${goal['name']}"/>
+ </div>
<div align="center" style ="color:${bgColor};height:20px">
${goal['name']}
</div>