Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to get images like product or customer images on webkit/mako reports?

By
Carlos Contreras
on 8/29/13, 11:50 AM 2,006 views

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

2
Carlos Contreras
On 8/29/13, 12:02 PM

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)
1
Torsten Francke
On 8/29/13, 12:19 PM

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.

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

OpenERP Vietnam
on 8/30/13, 6:06 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 8/29/13, 11:50 AM
Seen: 2006 times
Last updated: 3/16/15, 8:10 AM