Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4734 Näkymät

Hi there,

I am using aeroo to generate reports in OpenERP 7. I want to show a jpeg image in the report. I have this .odt  template:

<for each="o in objects">

<o.student_ids.image>

 

<o.faculty_id.name>

</for>

o.student_ids is the current row from the model I want to retrieve image from. Image is a BLOB in PostgreSQL database. This code only returns the bin code of the image, showed all in the pdf report. I tried to convert the image in a phisical one and passes it to the report using a function in the Parser(report_sxw.rml_parse) class, but I only received this text in the place the image should go:

<PIL.JpegImagePlugin.JpegImageFile image
mode=RGB size=249x202 at
0x7FC54C920F80>

I tried some other "solutions" I found in the web, but none of them worked for me.

I tried this other code in .odt template:

[[ o.student_ids.image and setTag('para','image',{'width':'80.0','height':'80.0'}) ]] [[ o.student_ids.image ]]

and it showed this error:

"Aeroo Reports: Error while generating the report.
list indices must be integers, not list..."

Then I tried this code in .odt template:

[o.student_ids.image and setTag('para','image',{'width':'80.0','height':'80.0'}) ] and [ o.student_ids.image ]

And it showed the pdf report with this text in the place the image should be appeared:

browse_record_list(1)

And so on... I really tried many many codes, but no one worked for me.

In .odt template (LibreOffice) I allways select Image Format when writing the code.

Please, how can I show the image in the report??

Cheers in advance.

 

 

 

Avatar
Hylkää
Paras vastaus

You should insert frame, then please refer to the following link for more details

http://www.alistek.com/wiki/index.php/Template_Directives#Frame

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
syysk. 17
5452
2
syysk. 17
6198
1
elok. 15
4549
3
elok. 15
13961
0
maalisk. 15
3484