[FIX]Fixed the issue of save selected fields list in export.
bzr revid: msh@openerp.com-20130618120154-o0cj17snpn00mh38
This commit is contained in:
parent
a3b9994a3e
commit
7a9ca47e21
|
@ -101,6 +101,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();
|
||||
}
|
||||
|
@ -148,18 +149,17 @@ 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;
|
||||
|
|
Loading…
Reference in New Issue