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.

1

Image from file in report pageGraphics section

By
Antanas
on 5/6/13, 10:58 AM 2,553 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

--Martin--
1978
| 5 6 8
Cornwall, Canada
--Martin--

Analysing, designing, coding and mentoring since 1975. Kilobytes to terabytes. Punch cards to punchy sites. My OpenERP video series: http://www.youtube.com/playlist?list=PLq7op4J183lX44ZlXPiHxUpRvmmRDtxye My Google Speadsheets --> OpenERP Data Pump project: http://martinhbramwell.github.io/GData_OpenERP_Data_Pump My email (with spaces removed) : mhb . warehouseman @ gmail . com

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

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

0 follower(s)

Stats

Asked: 5/6/13, 10:58 AM
Seen: 2553 times
Last updated: 3/16/15, 8:10 AM