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 Display Images in report

By
Ghulam Masood
on 3/27/15, 1:53 AM 579 views

Hello there ,

I have added a column of image to my object and i want to display that column in the report i have searched in the local packages but coukdnot find any help can anyone take me out of this issue 

1

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 3/27/15, 2:40 AM

In rml report you can use this:

<image x="1.0cm" y="24.0cm" width="5.0cm">[[ company.logo or removeParentNode('image') ]]</image>

Im mako/qweb reports

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

(or)
On your mako template:

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

Where

helper.embed_image(image_type, object_image,width,height)

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

1 follower(s)

Stats

Asked: 3/27/15, 1:53 AM
Seen: 579 times
Last updated: 3/27/15, 2:40 AM