Se rendre au contenu
Menu
Cette question a été signalée
3637 Vues

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
Ignorer
Publications associées Réponses Vues Activité
2
févr. 16
8816
7
avr. 23
28630
1
sept. 17
4170
1
sept. 20
5121
0
août 17
3337