跳至內容
選單
此問題已被標幟
4037 瀏覽次數

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


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
2月 16
9281
7
4月 23
29487
1
9月 17
4692
1
9月 20
5495
0
8月 17
3650