QR code support as a control in ERPNext

hi ,
I am new to frappe and ERPNext. I was trying to build a QR code control for ERPNext. I have seen some blogs on PyQRCode 1.2.1, which can be used. I wan wondering how to build a control, using PyQRCode 1.2.1?

Can you one please guild me to make a control using the same?
thanks in advance .

@cpurbaugh and I implemented a QR code in print format. Chris has largely been the one getting the controls in place. This specific project has been on the back burner for a couple of weeks as we wrap up a migration project.


  1. Add qrcode to requirements.txt (bench update --requirements is required afterwards)
  2. Make your QR code method
  3. Add it to the jinja environment in hooks.py (Bench restart required to pick up changes in hooks)
  4. Include it in a print format

So this will get you QR code that you can style in terms of size and text input in your print formats. How you use it for control flow, is up to you, but I think it would make sense to create a sticky footer that gives you some document details.


@tmatteson & @cpurbaugh Hope you doing well. Need some help from you folks. The links in your thread are no longer valid. Please share newer links if you have.

I would like to get QR code imported from a 3rd party into ERPNext in the sales Order or Sales Invoice page. Idea is that services will be booked by Customer on a 3rd party webserver. Service can be booked with or without payment so sales order / sales invoice is made respectively. All relevant information including QR code is received by ERPNext via API. Based on information order (unpaid) or invoice (paid) is made by ERPNext

When buyer physically comes to get the service at client location they will show the QR code generated by 3rd party on their mobile application. User scans the QR code and ERPNext fetches the DocType.

Please note that QR code is generated by 3rd party, not by ERPNext. We may need to generate QR code when converting order to invoice but that is not sure at this stage.

The most important point is getting the QR code into ERPNext and fetching it on scanning. Any idea how I can implement this. We are using V12 in production for this implementation.

Thanks for the help.

1 Like

As i understand, there shouldnt be any challange. it should be simpl.

  1. once you receive response from thirdparty including QRCode, Which should be a unique Code or you can check what it contains.

  2. from same code or URL you can generate your own QR Code in ERPNext if you want but not ncessasry.

  3. now you have to scan Thirdparty QRCode to get details from ERPNext which you already saved through API response. for this, you can add QRCode Field in Standard Filter and in that field , scan QRCode it’ll input the code and will filter the records.

in you can provide some more information, may be community can help you better…

1 Like

Which field type should be used?
Because I think there is no existing fieldtype for QR.

you can use any text or HTML field. as you dont have to show QR Code in normal view. and from that code, you can draw QR in Print Format.

I created a demo repo for this problem: