Skip to Content
Menu
This question has been flagged
2744 Views

I have created a report to generate product labels. The report works fine if I access if via URL;

http://localhost:8069/report/pdf/my_labels.report_labels/24

However if I try to generate the report from a form (a wizard that allows me to specify language and currency), I'm getting a report with the correct data but with the barcode missing. The log shows multiple instances like the following;

GET /report/barcode/?type=Code128&value=5060487671297&width=600&height=100 HTTP/1.1" 302 -

followed by

GET /web/login?redirect=http%3A%2F%2Flocalhost%3A8069%2Freport%2Fbarcode%2F%3Ftype%3DCode128%26value%3D5060487670849%26width%3D600%26height%3D100 HTTP/1.1" 200 -

This is my code to call the report from my wizard class;

    @api.multi
def print_request(self, context=None):

#todo: use id from picking
datas = {'ids': [24]} #self.picking_id.id}

return {
'type': 'ir.actions.report.xml',
'report_name': 'my_labels.report_labels',
'datas': datas,
'context': context,
'target': 'current',
}


Avatar
Discard
Author

I should add that I'm on Odoo 9. Also I do currenty have the stock.pikpicking id hard coded to 24, though this will of course change.

Related Posts Replies Views Activity
1
Nov 24
110
0
Aug 24
236
2
Nov 23
1467
5
Aug 23
8005
2
May 23
1261