Skip to Content

Contributors

Re: Odoo mailing-list (channels) and missing pictures

> The access_token is working perfectly but the img src is not composed using

> a FQDN ... Is there a module-workaround for this ? If not, I will have to

> create a fix, does someone know where it occurred in the code ?

https://github.com/OCA/OCB/blob/14.0/addons/mail/models/mail_thread.py#L1779

This could be fixable by simply adding a base tag to the email html
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
but that's not supported in some mail clients like Outlook.

You might want to migrate
https://github.com/OCA/social/tree/10.0/mail_embed_image
to have Odoo send mails with embedded images, but for mailinglists that's not 
such a good choice because it would blow up the amount of traffic tremendously.


-- 
Your partner for the hard Odoo problems
https://hunki-enterprises.com

by Holger Brunn - 06:25 - 5 Oct 2021

Reference

  • Odoo mailing-list (channels) and missing pictures
    Hi everyone,

    I'm currently stuck on an Odoo behaviour about pictures in email sent on Odoo mailing-lists.

    I'm pretty sure that you already noticed this behaviour on this list: instead of seeing your picture, you see its alt attribute as "picture-of-thing.png".

    That's because when the mail is sent to Odoo, it converts base64 pictures to attachments and the mail content is transformed with an img tag

    <img src="/web/image/521951?access_token=a8301246-ab90-46a5-9dfe-eff9df3dafb4" alt=" picture-of-thing.png" width="437" height="562">

    The access_token is working perfectly but the img src is not composed using a FQDN ...

    Is there a module-workaround for this ?
    If not, I will have to create a fix, does someone know where it occurred in the code ?


    Yann PAPOUIN
    Ingénieur R&D | DEC

    ZAC du Monné 3 r Champ du Verger 72700 ALLONNES
    02 43 21 65 50 ext 51  ­ 02 43 39 30 78  ­ ypa@decgroupe.com ­ www.decgroupe.com ­

    by Yann Papouin - 05:16 - 5 Oct 2021