diff --git a/sql_export/wizard/wizard_file.py b/sql_export/wizard/wizard_file.py index 5a99ddc264..da6e9b3313 100644 --- a/sql_export/wizard/wizard_file.py +++ b/sql_export/wizard/wizard_file.py @@ -102,11 +102,12 @@ def export_sql(self): % {"name": sql_export.name, "date": date, "extension": extension}, } ) - return { - "view_mode": "form", - "res_model": "sql.file.wizard", - "res_id": self.id, - "type": "ir.actions.act_window", - "target": "new", - "context": self.env.context, + action = { + "name": "SQL Export", + "type": "ir.actions.act_url", + "url": "web/content/?model=%s&id=%d&filename_field=filename&" + "field=binary_file&download=true&filename=%s" + % (self._name, self.id, self.file_name), + "target": "self", } + return action diff --git a/sql_export/wizard/wizard_file_view.xml b/sql_export/wizard/wizard_file_view.xml index 8ac944fbe3..b604e69d39 100644 --- a/sql_export/wizard/wizard_file_view.xml +++ b/sql_export/wizard/wizard_file_view.xml @@ -10,13 +10,7 @@ colspan="4" invisible="1" /> - - - +