diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-01-29 12:47:29 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-01-29 12:51:47 +0100 |
| commit | 4c2706d6858c4b7ec6db4b647dc2e3559f650cd8 (patch) | |
| tree | d53f2bd6228a0912ff76f79bab7297645d3d7b32 /addons/web/controllers/main.py | |
| parent | a4597fe34fcfa8dae28b156410080346bb33af33 (diff) | |
[FIX] web: saveas_ajax, correct filename when data passed directly
In cases where data is directly given to the saveas_ajax controller,
the filename was not correctly set, as no read method was performed.
(The read call is useless as the data is already avaiable in such a case)
In such cases, the filename must be given in advance
opw-626707
Diffstat (limited to 'addons/web/controllers/main.py')
| -rw-r--r-- | addons/web/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 6206d1fa4d4..b3acbbe5119 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1309,7 +1309,7 @@ class Binary(openerpweb.Controller): if filename_field: fields.append(filename_field) if data: - res = { field: data } + res = {field: data, filename_field: jdata.get('filename', None)} elif id: res = Model.read([int(id)], fields, context)[0] else: |
