首页 文章

Odoo 12 qweb报告没有渲染图像

提问于
浏览
0

我在我的V10 qweb报告中有以下代码 .

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

它在V10中正确渲染图像,但在V12中它没有显示图像,我检查了wkhtmltopdf并且它安装正确 .

1 回答

  • 0

    我解决了它,在odoo 12中我们需要将二进制字段传递给函数 .

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

    这解决了我的问题!

相关问题