Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4572 Widoki

There seems to either be something I am missing, or something is not working right.

I set the company Logo in 'my companies' configuration, but it refuses to replace the 'my logo' placeholder on my system generated emails. The testing emails I have been using are quotation emails and purchase order emails. The logo will not show, but oddly enough the logo does show on the attached document (ie. attached invoice PDF).

I need to send my first invoice to one of my clients asap, so I would appreciate any help that one can give me so that I don't end up looking unprofessional when I send it to them to sign.


Thanks in advance!

Awatar
Odrzuć
Autor

What I have tried so far:

Refreshing browser cache

Removing / replacing logo with an image that works on one of my other Odoo instances

Rebundling asset bundles

Restarting Odoo14 service + DB + WebServer

I have also tried hunting for functionality to manually change the header for outgoing emails, but I can't seem to find where to do that. Email templates are just for email body content.

Any other ideas would be much appreciated.

Did you ever solve this issue?
I am running into exact the same problem.

Najlepsza odpowiedź

Hi,

Hi,

To embed an image in an email template in Odoo, you can use base64 encoding. Here's the way to do it:

<img t-attf-src="data:image/*;base64,{{ company.logo }}" t-att-alt="company.name"/>

In this snippet:

       

  • t-attf-src attribute sets the source of the image. Here, {{ company.logo }} is a placeholder for the base64 encoded string of the image.
  •    

  • t-att-alt attribute sets the alternative text for the image, which is useful for accessibility purposes.

Make sure to replace {{ company.logo }} with the actual base64 encoded string of the image. This method ensures that the image is embedded directly within the email template



Hope it helps



Awatar
Odrzuć
Najlepsza odpowiedź

we also need how did you solve guys

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
lip 21
2887
1
lip 15
6414
1
lis 22
3487
2
wrz 21
14585
1
mar 15
7528