Hi,
My reporting class return a pdf document :
class MyReport(Report):
__name__ = 'mymodule.myreport'
@classmethod
def execute(cls, ids, data):
# code to create myfile.pdf
...
pdf_buffer = None
with open('myfile.pdf', 'rb') as pdf:
pdf_buffer = pdf.read()
return ('pdf', pdf_buffer, False, 'myreport' )
The problem is that json won't encode binary stuff.
I'm trying to understand how it's done for images in odt, or odt itself
since its a zip file, but it's a bit tedious and I'd be grateful for some
help.
V.