I want to print two reports from one python method, i've tried all the codes that i found but, isn't working, actually a have this:
@api.multi
def print_custom_documents(self):
first_report = self.env.ref('custom_module.billing_report_sample').report_action(self)
second_report = self.env.ref('custom_module.invoice_report_sample').report_action(self)
return first_report, second_report
The method is called in the form view with a button.
Also i've tried to create three methods, one to print the first report, one for the second, and the thirth to call the first and the second.
have you tried this?
return self.env.ref('custom_module.billing_report_sample').report_action(self), self.env.ref('custom_module.invoice_report_sample').report_action(self)
instead of setting up 2 variables and calling them in the return method? i know it sounds weird because it might be the same thing, but who knows if its a python thing.
also make sure that "invoice_report_sample" is the id="invoice_report_sample" in your xml code
hope I helped you, thanks.