Odoo Help


How can I add a product's image in report? [Closed]

on 4/3/13, 12:05 AM 4,827 views

The Question has been closed

Sudhir Arya (SA)
on 04/18/2013 05:02:46

I want to add a image in the purchase order, and I add: o.order_line.product_image in sxw. But it can't show in my report_order...

Maybe is because "o.order_line.product_image" is binary ? And how can I do with it .... Thanks

Sudhir Arya (SA)
On 4/3/13, 1:41 AM

You can use <image> tag in rml.

Try this;

    <image x="1.3cm" y="27.8cm" height="40.0" >[[product_id.product_image]]</image>


    <image height="30.0" width="40.0">[[product_id.product_image]]</image>

or you can put image conditionally like this:

    <para>[[ product_id.product_image and setTag('para','image',{'width':'50.0','height':'50.0'}) or removeParentNode('para') ]][[ product_id.product_image ]]</para>

The image is loading. but after changing some more things in my .sxw and then conveting it to rml gives some alphanumeric values in place of the image...

Sreedath Namangalam
on 4/25/13, 11:03 AM

Hello Sudhir! It is interesting, because if I add a new column in to my sale.order report /.sxw/ and put the already showing context like: [[ format(line.name) ]] or [[ formatLang(o.amount_untaxed, dp='Account', currency_obj=o.pricelist_id.currency_id) ]] it is working and showing on the printed .pdf file. In other case if I put the [[product_id.product_image]] it is not showing up, it is only gives some alphanumeric values. It seem it is not the problem with the .sxw file, but the product image pathname. Can you please sorted this out?

Kris Krnacs
on 5/30/13, 7:20 AM

Hello Sudhir, I want to a extra table in my sale and purchase order such as serial numbers 1,2,3...... for the number of products entered can you please help me out

Sampath Kumar S
on 11/12/13, 8:33 AM
On 4/3/13, 7:05 AM

I find that if I have used openoffice to change the sxw, then I can't change the rml in addons/**/report ....

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

0 follower(s)


Asked: 4/3/13, 12:05 AM
Seen: 4827 times
Last updated: 3/16/15, 8:10 AM