Odoo Help

1

Image from file in report pageGraphics section

By
Antanas
on 5/6/13, 10:58 AM 3,012 views

Hello,

I want to add an image, which is in module's report folder into a report pageGraphics section, f.e.:

<pageGraphics>
    <image file="logo.gif" x="300" y="700"/>
</pageGraphics>

Doing this results in:

IOError('File logo.gif cannot be found in image path\n   handle_pageBegin args=()',)

Can it be done and how? Or should I better try put an image somewhere on page frame or table?

Did you get any further with this?

Martin
on 5/7/13, 8:50 AM

I decided to use binary code instead of image file. I generated binary code for image with openerp's openerp_sxw2rml.py script, put that code into rml stylesheet, and placed in pagegraphics section. Quite the same achieved.

Antanas
on 5/7/13, 10:18 AM

Did you find a way?

Martin
on 5/9/13, 9:35 AM
2
Martin
On 5/6/13, 11:06 AM

Do you see that the error refers to a file called logo_first_crop.gif while your XML refers to a file called logo.gif?

Update : Have you tried using an absolute path like /something/logo.gif (or C:\something\logo.gif ) ?

Getting images to add to a report ...

I am not certain if this is applicable in your case, but it might help.
How to export real image not binary code

Unfortunattely mismatching names is not the case. I just changed them to post here and left one unchanged before. Perhaps it cannot be done, unless image is accessed through ORM, bu i need it to be packaged in module.

Antanas
on 5/6/13, 11:19 AM

Perhaps using an absolute path like /something/logo.gif (or C:\something\logo.gif ) will clarify whether it is indeed impossible.

Martin
on 5/6/13, 11:51 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.

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: 5/6/13, 10:58 AM
Seen: 3012 times
Last updated: 3/16/15, 8:10 AM