I have a wizard that generates an Excel report. The report generation is working fine, but I want to automatically close the wizard window after the user downloads the report. Currently, after the report is downloaded, the wizard window remains open, and the user has to manually close it.
Here's the relevant code snippet from my action_generate_excel_report method:
def action_generate_excel_report(self):
# ... (code to generate the Excel report and create an ir.attachment record)
# Return an action to download the Excel report
return {
'type': 'ir.actions.act_url',
'url': 'web/content/%s?download=true' % (doc.id),
'target': 'self',
}