diff options
| author | Christophe Simonis <chs@openerp.com> | 2014-03-18 13:40:50 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2014-03-18 13:40:50 +0100 |
| commit | a2f9619e267a45d0959e7a942ba4e520d91fbb94 (patch) | |
| tree | 3130977e61cfc7ab3afe093716363489ca93cc87 /addons/web/static/src/js/data_export.js | |
| parent | 788708563133720c2833fdf0f67515940f6d4cd9 (diff) | |
| parent | 541a5d3f82e6c2422644caff5b793d96954c2e93 (diff) | |
[MERGE] forward port of branch saas-3 up to revid 3975 chs@openerp.com-20140318115516-sn3laxqseam1oz3f
bzr revid: chs@openerp.com-20140318124050-ul3reev0vvmgqxz8
Diffstat (limited to 'addons/web/static/src/js/data_export.js')
| -rw-r--r-- | addons/web/static/src/js/data_export.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/addons/web/static/src/js/data_export.js b/addons/web/static/src/js/data_export.js index 2725e18ea6e..252a5a378cc 100644 --- a/addons/web/static/src/js/data_export.js +++ b/addons/web/static/src/js/data_export.js @@ -119,6 +119,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ if (select_exp.val()) { self.exports.unlink([parseInt(select_exp.val(), 10)]); select_exp.remove(); + self.$el.find("#fields_list option").remove(); if (self.$el.find('#saved_export_list option').length <= 1) { self.$el.find('#ExistsExportList').hide(); } @@ -166,18 +167,16 @@ instance.web.DataExport = instance.web.Dialog.extend({ export_fields: _(fields).map(function (field) { return [0, 0, {name: field}]; }) - }, function (export_list_id) { - if (!export_list_id.result) { + }).then(function (export_list_id) { + if (!export_list_id) { return; } - self.$el.find("#saved_export_list").append( - new Option(value, export_list_id.result)); - if (self.$el.find("#saved_export_list").is(":hidden")) { + if (!self.$el.find("#saved_export_list").length || self.$el.find("#saved_export_list").is(":hidden")) { self.show_exports_list(); } + self.$el.find("#saved_export_list").append( new Option(value, export_list_id) ); }); this.on_show_save_list(); - this.$el.find("#fields_list option").remove(); }, on_click: function(id, record) { var self = this; |
