Einvoice features in version 10

I am trying to implement einvoice features in Erpnext version 10 via custom app.
Irn code generated successfully but Qrcode file saved with 0 bites & blank content.
I am following the below code:
qr_image = io.BytesIO()
url = qrcreate(qrcode, error=‘L’)
url.png(qr_image, scale=2, quiet_zone=1)
_file = frappe.get_doc({
“doctype”: “File”,
“file_name”: filename,
“attached_to_doctype”: doctype,
“attached_to_name”: docname,
“attached_to_field”: “qrcode_image”,
“is_private”: 1,
“content”: qr_image.getvalue()})
self.invoice.qrcode_image = _file.file_url
(copied the above code from erpnext erpnext/einvoice/utils.py)
_file. file_url return None and qr_image.getvalue() not getting save.


Hi Prashanta,
Did you manage to solve this? I’ve to implement the same in V11.


Yes, I have copy the code from Erpnext github repo and modify as per our requirements in my custom app.

I’ve create a separate doctype for generate IRN after submit of the tax invoice.