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

Hey How I can print multiple report on one Button click here is some sample which I was trying but it didn't succeeded,

 

# Function : Print A5 receipt
@api.multi
def print_thermal_reciept_imaging(self):
return self.env.ref('gts_hms_single_payment_panel.single_window_thermal_receipt_imaging').report_action(self)

@api.multi
def print_thermal_reciept_labtest(self):
return self.env.ref('gts_hms_single_payment_panel.single_window_thermal_receipt_labtest').report_action(self)

@api.multi
def print_thermal_reciept_other_procedure(self):
return self.env.ref('gts_hms_single_payment_panel.single_window_thermal_receipt_other_procedure').report_action(self)

@api.multi
def print_thermal_reciept_surgery(self):
return self.env.ref('gts_hms_single_payment_panel.single_window_thermal_receipt_surgery').report_action(self)

@api.multi
def print_thermal_reciept(self):
return self.print_thermal_reciept_imaging(), self.print_thermal_reciept_labtest(), self.print_thermal_reciept_other_procedure(), self.print_thermal_reciept_surgery()
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You can create multiple pages in single report. in A5 it can be seperate pages  as well.

In your template you can put multiple page tage-

<page> your template code</page>

<page>your template code</page>

Ảnh đại diện
Huỷ bỏ
Tác giả

this works

Câu trả lời hay nhất

Hello,
you can try this. it will definitely help you.
you can use base method in button. when click button that call main method,
main method call all sub methods.

@api.multi
def call_all_methods(self):

self.print_thermal_reciept_imaging()

self.print_thermal_reciept_labtest()

self.print_thermal_reciept_other_procedure()

self.print_thermal_reciept_surgery()

self.print_thermal_reciept()

Thank You.
Ảnh đại diện
Huỷ bỏ
Tác giả

I Have Tried this one get work out. even though the earlier solution seems not to be working.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 24
1540
0
thg 8 24
1590
2
thg 11 23
3557
2
thg 5 23
2581
1
thg 2 23
7407