wizard saving to an file not being downloaded correctly by the web client
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web Client |
Fix Released
|
High
|
Sananaz (Open ERP) |
Bug Description
I use pyExcelerator to save some data to an excel file in a wizard and send it to the client.
The idea is that the client should present a dialog to the user allowing the file to be downloaded.
Code snippet:
file=
out=
return {'data': base64.
...
<?xml version="1.0"?>
<form string="Export">
<image name="gtk-
<group colspan="2" col="4">
<separator string="Export to Excel" colspan="4"/>
<field name="data" readonly="1" colspan="3" filename=
<label align="0.0" string="Save this document to a .XLS file and open it with\n Excel." colspan="4"/>
</group>
</form>
..
fields_finish={
'data': {'string':'File', 'type':'binary', 'readonly': True,},
}
In fact a dialog is present to the user which shows "File:", then the encoded file text (e.g. 0M8R4KGxGuEAAAA
This does not happen with the GTK GUI.
Version: I've tried with bzr from last week and 5.0.10 tarball, same result.
Os is ubuntu 8.04 with python 2.5.2
There is a tricky catch:
- I've tried this on 3 different servers, on one old Ubuntu 8..04 it works just fine (not encoded text shown, just the file download), on the other two (8.04 fresh install and 9.10) it exhibits the behaviour above.
There is a more complete description, also with rpc traces on:
http://
We have experienced this problem too when using the jasper_reports module. The wizard that generates the datasource template works all-right on the GTK client (returns the XML file), but on the web client it just shows up the data from the file on the page (causing havoc). That is, instead of a widget with download/upload buttons and such, the contents of the file are inserted on the HTML.