From 47d72f7a0fe80d2ba070c12ff074e9e959524929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 25 Jul 2013 17:57:40 +0200 Subject: [IMP] export: delegated ids computation to the python side, the js gives ids or the domain to use; + fixed statically export formats bzr revid: tde@openerp.com-20130725155740-g9a76z08ogjejp86 --- addons/web/static/src/js/data_export.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/data_export.js b/addons/web/static/src/js/data_export.js index d0ac4718c17..e58cc551ed1 100644 --- a/addons/web/static/src/js/data_export.js +++ b/addons/web/static/src/js/data_export.js @@ -379,15 +379,16 @@ instance.web.DataExport = instance.web.Dialog.extend({ var export_format = this.$el.find("#export_format").val(); - var ids_computation = this.getParent().get_active_domain().then(function (results) { - if (results === undefined) { - return self.getParent().get_selected_ids(); + this.getParent().get_active_domain().then(function (domain) { + if (domain === undefined) { + var ids_to_export = self.getParent().get_selected_ids(); + var domain = self.dataset.domain; } else { - return self.dataset.call('search', [results]); + var ids_to_export = false; + var domain = domain; } - }); - $.when(ids_computation).done(function (ids_to_export) { + var ids_t_ instance.web.blockUI(); self.session.get_file({ url: '/web/export/' + export_format, @@ -395,7 +396,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ model: self.dataset.model, fields: exported_fields, ids: ids_to_export, - domain: self.dataset.domain, + domain: domain, import_compat: !!self.$el.find("#import_compat").val(), })}, complete: instance.web.unblockUI, -- cgit v1.2.3