Odoo Help


How to add image into report

Dr Obx
on 10/23/15, 6:51 AM 516 views

Guys, I would like to add image to the report but  I have no clue how to do it .....

<?xml version="1.0" encoding="ISO-8859-1"?>


<lot-line type="fields" name="id">

<title type="field" name="item_id"/>

<image height="40.0" width="40.0">[[iprodstep_log.image]]</image> #My image




<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:variable name="initial_bottom_pos">11.8</xsl:variable>

<xsl:variable name="initial_left_pos">0.02</xsl:variable>

<xsl:variable name="height_increment">10</xsl:variable>

<xsl:variable name="width_increment">10</xsl:variable>

<xsl:variable name="frame_height">101mm</xsl:variable>

<xsl:variable name="frame_width">101mm</xsl:variable>

<xsl:variable name="number_columns">1</xsl:variable>

<xsl:variable name="max_frames">2</xsl:variable>

<xsl:template match="/">

<xsl:apply-templates select="lots"/>


<xsl:template match="lots">


<template leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Address list" author="">

<pageTemplate id="all">


<xsl:apply-templates select="lot-line" mode="frames"/>




<paraStyle name="nospace" fontName="Courier" fontSize="10" spaceBefore="0" spaceAfter="0"/>

<blockTableStyle id="mytable">

<!--<blockBackground colorName="lightred" start="0,0" stop="0,0"/>-->

<blockBackground colorName="lightgrey" start="1,0" stop="-1,0"/>

<blockAlignment value="CENTER"/>

<blockValign value="MIDDLE"/>

<blockFont name="Helvetica-BoldOblique" size="14" start="0,0" stop="-1,0"/>

<blockFont name="Helvetica" size="8" start="0,1" stop="-1,1"/>

<lineStyle kind="GRID" colorName="black" tickness="1"/>




<xsl:apply-templates select="lot-line" mode="story"/>




<xsl:template match="lot-line" mode="frames">

<xsl:if test="position() &lt; $max_frames + 1">


<xsl:attribute name="width">

<xsl:value-of select="$frame_width"/>


<xsl:attribute name="height">

<xsl:value-of select="$frame_height"/>


<xsl:attribute name="x1">

<xsl:value-of select="$initial_left_pos + ((position()-1) mod $number_columns) * $width_increment"/>



<xsl:attribute name="y1">

<xsl:value-of select="$initial_bottom_pos - floor((position()-1) div $number_columns) * $height_increment"/>






<xsl:param name="pmaxChars" as="xs:integer" select="80"/>

<xsl:template match="lot-line" mode="story">

<blockTable style="mytable" colWidths="10cm">



<para style="nospace"><xsl:value-of select="title" /></para>





<xsl:value-of select="image" />







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


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

1 follower(s)


Asked: 10/23/15, 6:51 AM
Seen: 516 times
Last updated: 10/23/15, 6:51 AM