diff options
| author | Gery Debongnie <ged@openerp.com> | 2014-03-19 11:15:09 +0100 |
|---|---|---|
| committer | Gery Debongnie <ged@openerp.com> | 2014-03-19 11:15:09 +0100 |
| commit | c0a51ebc3448136e6e2371f981cc56f5cc5c52ef (patch) | |
| tree | d2c10d0311cccfc7e4c0fa0d8fa8c6618b477075 /addons/web/static/src/js/data_export.js | |
| parent | 36f2ff879a8726a86c7bab87ceec4657dbbf93b6 (diff) | |
| parent | a2f9619e267a45d0959e7a942ba4e520d91fbb94 (diff) | |
[MERGE] merge from trunk
bzr revid: ged@openerp.com-20140319101509-txjzkcgk7cs4x4rz
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; |
