summaryrefslogtreecommitdiff
path: root/addons/website_livechat/views/website_livechat.xml
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2017-10-09 17:55:42 +0200
committerYannick Tivisse <yti@odoo.com>2017-10-10 10:39:43 +0200
commit1df6f4c74151d012f9ff784cef6eea58a5ac3b9e (patch)
tree4365f3bdcd4aa29d4d8a7fd3816078e3f5ea1746 /addons/website_livechat/views/website_livechat.xml
parent707c6b8016f2444494abfed97644b5022305aa05 (diff)
[FIX] ir_actions_report: Render correctly the base64 images in P3
Purpose ======= In python2 a binary field value is retrieved as a string. Example: company_id.logo = u'xyz' In python3 a binary field value is retrieved as a binary. Example: company_id.logo = b'xyz' When trying to render an image on a template, we should pass a stringified version of it. Specification ============= Pass the method to_text in the template rendering context and use it.
Diffstat (limited to 'addons/website_livechat/views/website_livechat.xml')
-rw-r--r--addons/website_livechat/views/website_livechat.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_livechat/views/website_livechat.xml b/addons/website_livechat/views/website_livechat.xml
index c43c4294dec..3a0caa340ba 100644
--- a/addons/website_livechat/views/website_livechat.xml
+++ b/addons/website_livechat/views/website_livechat.xml
@@ -126,7 +126,7 @@
<t t-foreach="team" t-as="user" class="media">
<div class="media">
<div class="pull-left" t-if='user.image_small'>
- <img t-att-src="user.image_small and ('data:image/png;base64,' + user.image_small) or '/web/static/src/img/placeholder.png'"
+ <img t-att-src="user.image_small and ('data:image/png;base64,' + to_text(user.image_small)) or '/web/static/src/img/placeholder.png'"
class="img-rounded" t-att-alt="user.name"/>
</div>
<div class="media-body">
@@ -159,7 +159,7 @@
<t t-foreach="channels" t-as="channel">
<div class="media">
<a class="pull-left" t-attf-href="/livechat/channel/#{ slug(channel)}">
- <img t-att-src="channel.image_small and ('data:image/png;base64,' + channel.image_small) or '/web/static/src/img/placeholder.png'" t-att-alt="channel.name" />
+ <img t-att-src="channel.image_small and ('data:image/png;base64,' + to_text(channel.image_small)) or '/web/static/src/img/placeholder.png'" t-att-alt="channel.name" />
</a>
<div class="media-body">
<h4 class="media-heading"><t t-esc="channel.name"/></h4>