diff options
| author | Jérome Maes <jem@openerp.com> | 2015-09-30 16:08:03 +0200 |
|---|---|---|
| committer | Jérome Maes <jem@openerp.com> | 2015-10-01 12:41:18 +0200 |
| commit | 3304b31938a5f9189ba0e1966cf2e31ef129b2cf (patch) | |
| tree | be473be7a718f38907d8d57f3ae116a9782227dc /addons/mail/static/src/xml/mail_chat_common.xml | |
| parent | a9148a9f2eda0c6e6bc21aeb7941639917b465a5 (diff) | |
[FIX] im_livechat, website_mail : message author avatar visible
To display author avatar to public user, using the /web/image url with res.partner returns the placeholder since public doesn't have access. Using the url on mail.message will display the avatar according to the access right defined on res_model/res_id of mail.message. However this executes mush query to fetch the avatar image (1 per message, against 1 per partner).
Maybe this wasn't a bug, but since it is a regression, this deserves to be fixed ...
Diffstat (limited to 'addons/mail/static/src/xml/mail_chat_common.xml')
| -rw-r--r-- | addons/mail/static/src/xml/mail_chat_common.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/xml/mail_chat_common.xml b/addons/mail/static/src/xml/mail_chat_common.xml index 61daa42d5b1..7bbbc3f94d7 100644 --- a/addons/mail/static/src/xml/mail_chat_common.xml +++ b/addons/mail/static/src/xml/mail_chat_common.xml @@ -33,7 +33,7 @@ <div class="o_mail_chat_im_message_avatar"> <img t-if="message.message_type == 'email' && (!message.author_id || !message.author_id[0]) && message.email_from" src="/mail/static/src/img/email_icon.png" alt="avatar" class="img-responsive img-rounded"/> <img t-if="message.message_type == 'email' && (message.author_id && message.author_id[0]) && !message.email_from" t-att-src="'/web/image/res.partner/'+message.author_id[0]+'/image_small'" class="img-responsive img-rounded"/> - <img t-if="message.message_type !== 'email' && (message.author_id && message.author_id[0])" t-att-src="'/web/image/res.partner/'+message.author_id[0]+'/image_small'" class="img-responsive img-rounded"/> + <img t-if="message.message_type !== 'email' && (message.author_id && message.author_id[0])" t-att-src="'/web/image/mail.message/'+message.id+'/author_avatar'" class="img-responsive img-rounded"/> <img t-if="message.message_type !== 'email' && (!message.author_id || !message.author_id[0])" src="/mail/static/src/img/smiley/avatar.jpg" class="img-responsive img-rounded"/> </div> <div class="o_mail_chat_im_message_core"> |
