コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
4672 ビュー

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!

アバター
破棄
著作者

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.

最善の回答

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



アバター
破棄
最善の回答

we also need how did you solve guys

アバター
破棄
関連投稿 返信 ビュー 活動
0
7月 21
2990
1
7月 15
6488
1
11月 22
3567
2
9月 21
14771
1
3月 15
7617