Odoo Help


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.


Display image in QWeb report

Victor Godayer
on 2/17/15, 7:07 AM 4,861 views



I extended the 'report.external_layout_footer' qweb view to display image.

Below is my code in the file reports/external_layout.xml:

        <template id="report_footer_custom" inherit_id="report.external_layout_footer">
            <xpath expr="//div[@class='footer']" position="replace">
                <div class="footer">
                        <img t-att-src="'data:image/jpeg;base64,/var/www/cbl_openerp/openerp/cap_addons/cap_sale/img/footer.jpeg'"/>
                        <ul class="list-inline">
                                <span class="page"/>
                                <span class="topage"/>



And here is my __openerp__.py content :

    "depends": ["base","sale","report"],
    "data": ['sale.xml',


But when I print a sale order, i can't view my image at the bottom of the page.

Does anyon has already faced this issue ?


Thank you for your help



Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
| 5 3 6
Gandhinagar, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 2/17/15, 7:26 AM

Hello Victor,

remove this line

<img t-att-src="'data:image/jpeg;base64,/var/www/cbl_openerp/openerp/cap_addons/cap_sale/img/footer.jpeg'"/>

Your image should be saved inside static/src/img/image name

Try this code hope very help full.

<img src='/module name/static/src/img/image name with extention' style="max-height: 45px;"/>

if you find this answer helpful, please give me a thumbs up vote    

Thanks & Regards,

Ankit H Gandhi

HI, thanks for your help. I tried your solution, but it didn't change anything. I still can't see any image in the pdf generated...

Victor Godayer
on 2/17/15, 8:33 AM

update code.@Victor

Ankit H Gandhi(AHG)
on 2/17/15, 11:58 PM

Upgrading the module after restarting the server may work.

Rutul Raval (rra)
on 10/26/15, 5:55 AM
Dasadiya Chaitanya
On 2/20/15, 8:09 AM

The Below link should helpful for solve your Question



I hope this should helful for you ..:)


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

1 follower(s)


Asked: 2/17/15, 7:07 AM
Seen: 4861 times
Last updated: 10/20/16, 6:22 AM