Odoo Help


Product Images in Reporting

Michael Pol
on 11/2/15, 12:53 AM 962 views


Is it possible to put product images in Reporting of Sales, Purchase and Inventory Analysis.

I need product image along with product title when I drill down on products.

Can anyone help me how to modify reporting query and xml structure to display two attributes(image, title) of products.

Hi Michael, you are asking about Reporting analysis right? Not just the pdf reports of sale order, purchas order etc right?

Akhil P Sivan
on 11/2/15, 7:11 AM

Hi Akhil, You're right I am asking about Reporting, not about PDF reports. Thanks

Michael Pol
on 11/3/15, 5:26 AM
Rucha Dave (rda)
On 11/2/15, 5:35 AM

You just need to add below line in order line or invoice line table,

<img t-if="l.product_id.image" t-att-src="'data:image/png;base64,%s' % l.product_id.image" style="width:90px; height:90px;"/>

where, l is,

<t t-foreach="o.invoice_line" t-as="l"> or <t t-foreach="o.order_line" t-as="l">

For example,

if you want to add product title and image using xml than,

<table class="table table-bordered">



        <th><strong>Product Title</strong></th>





    <tr t-foreach="o.invoice_line" t-as="l">

        <td>span t-field="l.name"/</td>

        <td><img t-if="l.product_id.image" t-att-src="'data:image/png;base64,%s' % l.product_id.image" style="width:90px; height:90px;"/></td>





Thanks for the explanation, I guess you misunderstood my question. I was asking about Reporting e.g. Reporting / Sales / Sales Analysis.

Michael Pol
on 11/3/15, 5:30 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/2/15, 12:53 AM
Seen: 962 times
Last updated: 11/7/15, 1:06 PM