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

Hello!

In Odoo we have ability to print documents. And after I select the type of report (screenshot) - it instantly creates a pdf file. I would like that after clicking the button, the view I created with various settings is called and that only after clicking the Print button inside the view, printing occurs. 


Please tell me where in Odoo I can find the function that occurs when you click on the report type - I want to try to change it. :)


Thanks!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

There is a function _get_report_values, which will be executed on printing the reports, check and see whether it helps in your case. If the function is not existing for the report, you can add it.

See: How To Call A Python Function While Printing PDF Report in Odoo

Thanks

Ảnh đại diện
Huỷ bỏ

Hi, Niyas!

Did I understand correctly that this function is applied to individual reports? Is it possible to make our function always run when printing any report?

Thanks

Bài viết liên quan Trả lời Lượt xem Hoạt động
8
thg 5 25
42729
1
thg 3 15
4466
1
thg 2 24
3774
3
thg 10 22
19715
0
thg 12 20
2866