QR Code in custom print format

Once you upgrade from version-13 to version-14 e-Invoice QR codes in your custom print format won't work anymore. This guide will help you to add QR code in custom print formats.

Step 1: Make a web template for QR Code

First you'll have to create a Web Template for the QR Code, to go to web template list search for Web Template in awesome bar and create a new Web Template. Give it a name something like "E-Invoice QR Code", type as "Component" and module as "Printing".

web template naming

After this copy paste the below mentioned code snippet in the template field

<img src="data:image/png;base64,{{ get_qr_code(qr_text, scale=2) }}" class="qrcode">

Once you add the template the last step is to add the fields, add label, fieldname and fieldtype as shown in the image below and save the web temp