Comment 4 for bug 324179

Revision history for this message
paulkoan (c-launchpad-airbred-com) wrote :

Hello Jay,

Ok, I figured out the problem. If the document management filestore is not writable when you first try to print an invoice, you will get a traceback error - write permission denied.

However, the ir_attachment entry is still created, even though a file isn't created in the filestore.

If you fix the filestore so that it is writeable, and go to reprint the invoice, ir.attachment returns zero data to report_sxw.py - because the file is not there, which then passes zero data to Pdffilereader in pyPdf. This then hangs because it cannot handle a zero length pdf stream.

I think the answer is to not commit the entry to ir_attachment until the file is written. But more importantly, if the filestore gets deleted, ir.attachment should recognise this and signal that the attachment doesn't exist, rather than returning an empty stream.

By the way, as per bug 320126 I have tried:

[option]
filestore=/home/oerp/filestore

But this is not recognised as far as I can tell, it still uses the default ./filestore.

[options]
filestore=/home/oerp/filestore

Did not work either.