Odoo Help

2

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

By
CK
on 4/3/13, 12:05 AM 5,117 views

The Question has been closed

by
Sudhir Arya (ERP Harbor Consulting Services)
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

3

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
11594
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 

LinkedIn

Blog

Stackoverflow

Sudhir Arya
ERP Harbor Consulting Services
skype: 
sudhir@erpharbor.com 
Sudhir Arya (ERP Harbor Consulting Services)
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>

or

    <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
0
CK
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.

Register

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)

Stats

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