Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4664 Vizualizări

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.

 

 

 

Imagine profil
Abandonează
Cel mai bun răspuns

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

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
sept. 17
5409
2
sept. 17
6166
1
aug. 15
4499
3
aug. 15
13883
0
mar. 15
3438