Skip to Content
Menú
This question has been flagged
2 Respostes
7369 Vistes

If i have a module with an image, how to embed an image from my field on module to webkit pdf.

Avatar
Descartar
Autor Best Answer

I found it:

On your mako template:

${helper.embed_image('png', object.image,50,50) | n}

Where

helper.embed_image(image_type, object_image,width,height)
Avatar
Descartar
Best Answer

We use in sale_order:

<img src="data:image/png;base64,${line.product_id.image}" />

But than you must sure that all product images are png.

Avatar
Descartar

In some case, if you want to add fixed image, I will use base64 module to encode, decode this image and insert it into report

Related Posts Respostes Vistes Activitat
0
de març 15
3403
2
de nov. 22
3820
3
d’abr. 25
11272
1
de febr. 16
7754
1
de gen. 16
4133