Search code examples
odoowkhtmltopdfqwebodoo-12

Odoo 12 qweb report not rendering image


I have below code in one of my V10 qweb report.

 <img t-if="company.logo_footer" t-att-src="'data:image/png;base64,%s' % company.logo_footer" style="max-height: 30px;"/>

Its rendering image correctly in V10, but in V12 it does not show image, I checked wkhtmltopdf and it installed correctly.


Solution

  • I solved it, in odoo 12 we need to pass binary field to a function.

    <img t-if="company.logo_footer" t-att-src="image_data_uri(company.logo_footer)"  style="max-height: 30px;"/>
    

    This solved my issue !!!