[IMP] fix mime type in case of excel export

bzr revid: xmo@openerp.com-20110829104812-z2i5wa10rlanwm9p
This commit is contained in:
Xavier Morel 2011-08-29 12:48:12 +02:00
parent 272cc8b0c7
commit bf4e7856b6
1 changed files with 4 additions and 1 deletions

View File

@ -396,7 +396,10 @@ openerp.base.DataExport = openerp.base.Dialog.extend({
import_compat: parseInt(import_comp),
export_format: export_format
}, function(data) {
window.location = "data:text/csv/excel;charset=utf8," + data;
var mime = export_format === 'csv'
? 'text/csv;charset=utf8'
: 'application/vnd.mx-excel';
window.location = 'data:' + mime + ',' + data;
self.close();
});
},