Hello everyone,
I’m looking for a solution to display product images on the finalized PDF invoice.
I'm using odoo v18 community in a docker container.
I’ve seen that there’s a module for sales reports, but the images don’t appear on the PDF invoice that I send to customers.
After a long search and a tutorial from Odoo Mates for Odoo 12, I modified the account.report_invoice_document module so that it first checks if an image is available, and if so, places it above the product name with a maximum size of 50px. This works perfectly and shows up in the web preview, but as soon as you generate the PDF, only small placeholder frames appear, and the images are missing.
The code I used is as follows. Maybe someone can spot the mistake I’m making.
<t t-if="line.product_id.image_1920">
<div style="margin-top: 5px;">
<img t-att-src="'data:image/png;base64,' + line.product_id.image_1920.decode('utf-8')" style="max-height: 50px; max-width: 50px;" />
</div>
</t>
does anyone know this problem and can help?
thanks in advance