odooodoo-8rml

How to show image in report


I have image stored in odoo 8 module_name > static > img > image1.png
I want to show the image in rml report, so i'm using this script but the image does not showing

<image x="1.3cm" y="27.7cm" height="40.0" file="/static/img/image1.png"></image>

What is the correct script to show the image in rml report? Thank you


Solution

  • Odoo will first use an absolute path to get the image then will try the relative paths to: rml file, addons, and openerp

    In the case of relative path, using ../static/img/image1.png (the RML file is inside a folder at the same level as the static folder) should work.