# Force download of generated file

**URL:** https://discuss.tryton.org/t/force-download-of-generated-file/4456
**Category:** Developer
**Created:** [July 23, 2021, 1:39pm UTC](https://discuss.tryton.org/t/force-download-of-generated-file/4456 "2021-07-23T13:39:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hedererjs](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@hedererjs](https://discuss.tryton.org/u/hedererjs)
#### Post date: [July 23, 2021, 1:39pm UTC](https://discuss.tryton.org/t/force-download-of-generated-file/4456/1 "2021-07-23T13:39:19Z")

</div>

Hi,  
I have a wizard that generates a file. I would like to force download of this file on user computer when wizard comes to near final view. Is “ir.export” done for this need? I don’t find examples

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [July 23, 2021, 1:43pm UTC](https://discuss.tryton.org/t/force-download-of-generated-file/4456/2 "2021-07-23T13:43:25Z")

</div>

No.  
You can display the file in a binary field on the last view or you can trigger a report action that will generate the file.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [July 23, 2021, 1:43pm UTC](https://discuss.tryton.org/t/force-download-of-generated-file/4456/3 "2021-07-23T13:43:39Z")

</div>

You should generate your file using a [Report](https://docs.tryton.org/projects/server/en/latest/topics/reports/index.html#reports) and use an ActionReport as last step of your Wizard.

There is an example on the [PrintAeat Wizard](https://hg.tryton.org/modules/account_es/file/dbb1d2a4b87b/reporting_tax.py#l339) of the Spanish Localization module

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [August 22, 2021, 1:44pm UTC](https://discuss.tryton.org/t/force-download-of-generated-file/4456/4 "2021-08-22T13:44:22Z")

</div>

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