Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4058 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
feb 16
9310
7
apr 23
29502
1
set 17
4702
1
set 20
5501
0
ago 17
3666