Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4068 Lượt xem

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


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 16
9313
7
thg 4 23
29505
1
thg 9 17
4702
1
thg 9 20
5504
0
thg 8 17
3668