Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

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/
_file. file_url return None and qr_image.getvalue() not getting save.