Skip to Content
Menú
This question has been flagged
3929 Vistes

My code for the print button on the wizard:

   @api.multi
    def print_document(self):
        
        data = {
                'date_from': self.date_from,
                }

        return self.env['report'].get_action(
             self.location_ids, self.report_id.report_name, data=data)


I got an empty pdf file, with data=data or data={}.

Get_action without data parameter prints my report.


Alternatively i tried to put the values in context with with_context, but my values are not available in the context of the qweb parser.

Thanks


Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de febr. 16
9128
7
d’abr. 23
29290
1
de set. 17
4516
1
de set. 20
5356
0
d’ag. 17
3562