跳至內容
選單
此問題已被標幟
1 回覆
2688 瀏覽次數

I have inheritd  sale.order so that every sale.order now has an Image (fields.Binary)

Now, I want to show that image on the page when A customer looks at the order in the website

I tried using the quotation template builder from odoo but i dont think it is possible to render an image there, is it?

This is my current attempt

https://shottr.cc/s/GSYB/SCR-20220921-uia.png


I probably need to inherit the quotation template and add it via qWeb But I don't know how to do it, please tell me!


頭像
捨棄
最佳答案

Hi Josef,

You can try like this to render the image.

<img t-att-src="'data:image/png;base64,%s' %order.image.decode('utf-8')"/>




Regards

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
11月 22
3218
1
9月 22
4506
2
3月 22
2143
1
8月 23
2715
1
12月 22
2719