Hi, i want to write a report from proteus. I use the code below
def download_invoice(invoice_id):
report=Report('account.invoice')
Invoice = Model.get('account.invoice')
invoices = Invoice.find(condition=['id','=',invoice_id])
type_, data, print_, name = report.execute(invoices, {})
target = open(name+'.odt', 'w')
newFileByteArray = bytearray(data)
target.write(newFileByteArray)
The file 'Invoice - FV0005.odt' is created fine but is emty. What is the
correct way to do it?
Thanks
