Mohd Shoaib Sayyed
Mohd Shoaib Sayyed

Reputation: 47

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.

Upvotes: 1

Views: 1422

Answers (1)

Mohd Shoaib Sayyed
Mohd Shoaib Sayyed

Reputation: 47

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

Upvotes: 1

Related Questions