diff options
| author | Thibault Delavallée <tde@openerp.com> | 2013-07-25 17:57:40 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2013-07-25 17:57:40 +0200 |
| commit | 47d72f7a0fe80d2ba070c12ff074e9e959524929 (patch) | |
| tree | 3a26176aef1b2a1c3964e9d8bb4c1dfe8d38d50c /addons/web/static/src/js/data_export.js | |
| parent | 27735a2b850571798585975610ef03b9c72d6353 (diff) | |
[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
Diffstat (limited to 'addons/web/static/src/js/data_export.js')
| -rw-r--r-- | addons/web/static/src/js/data_export.js | 15 |
1 files changed, 8 insertions, 7 deletions
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, |
