Community mailing list archives

Retrieving delivery slips from Python

Torvald Baade Bringsvor, Torvald B. Bringsvor
- 11/05/2016 06:40:24

Our customer wants to be able to download packing notes from a wizard. So we have a list of pickings, and I try to do this:

reportname = 'stock.report_deliveryslip'
pdfdata = self.env['report'].get_pdf(pickings, reportname)

But I don't get the pdf, only 400 bytes or so of jibberish.

Anyone had any success with this kind of thing? It may be that I have to write a controller and do it as a http get, but I was trying to avoid the overhead.

Torvald Baade Bringsvor
Bringsvor Consulting AS - Odoo (formerly OpenERP) implementation partner

Skogveien 13b, 1406 Ski. Tel (+47) 4548 2848