How to print a report two times

Hi,

I would like to know how to print a report two times. I have checked “Print Directly” and want to have 2 copies of the same report.

Thanks in advance!

Click twice on the button.

1 Like

Thanks for the comment,

I’m using, but I need 2 copies of the same doc the button is pressed.

@ModelView.button_action('your_module.your_xml_id')

An option like number of copies in report will be helpful.

I think the easiest is to update your report template adding a for loop that for each report prints the desired number of copies.

1 Like

Could you help me with an example?

You should have a for each="record in records" loop on your report. Just add a for _ in range(2) above it and it will generate to copies for each record.

1 Like

Thanks @pokoli, it works fine.

Only need a little change shown below.

<py:for each="i in range(2)">

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.