diff options
| author | ggh-openerp <ggh@tinyerp.com> | 2012-10-03 17:58:36 +0530 |
|---|---|---|
| committer | ggh-openerp <ggh@tinyerp.com> | 2012-10-03 17:58:36 +0530 |
| commit | 30069a02398c4f9de698c6fcc43bc4958aa1d960 (patch) | |
| tree | 6b7273eeec8a0b839616443591a1b71fcd9abf5f /addons/web/static/src/js/data_export.js | |
| parent | 10513dc524cb46489fe3ed890359712e8a087611 (diff) | |
[IMP]In rpc method remove callback and modify relate code
bzr revid: ggh@tinyerp.com-20121003122836-36g8ijxdcjwgntjl
Diffstat (limited to 'addons/web/static/src/js/data_export.js')
| -rw-r--r-- | addons/web/static/src/js/data_export.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/js/data_export.js b/addons/web/static/src/js/data_export.js index 29aea6362f7..a06e9ccb155 100644 --- a/addons/web/static/src/js/data_export.js +++ b/addons/web/static/src/js/data_export.js @@ -49,7 +49,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ self.rpc("/web/export/get_fields", { model: self.dataset.model, import_compat: Boolean(import_comp) - }, function (records) { + }).then(function (records) { got_fields.resolve(); self.on_show_data(records); }); @@ -57,7 +57,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ return $.when( got_fields, - this.rpc('/web/export/formats', {}, this.do_setup_export_formats), + this.rpc('/web/export/formats', {}).then(this.do_setup_export_formats), this.show_exports_list()); }, do_setup_export_formats: function (formats) { @@ -91,7 +91,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ self.$el.find('#fields_list option').remove(); var export_id = self.$el.find('#saved_export_list option:selected').val(); if (export_id) { - self.rpc('/web/export/namelist', {'model': self.dataset.model, export_id: parseInt(export_id)}, self.do_load_export_field); + self.rpc('/web/export/namelist', {'model': self.dataset.model, export_id: parseInt(export_id)}).then(self.do_load_export_field); } }); self.$el.find('#delete_export_list').click(function() { @@ -181,7 +181,7 @@ instance.web.DataExport = instance.web.Dialog.extend({ import_compat: Boolean(import_comp), parent_field_type : record['field_type'], exclude: exclude_fields - }, function(results) { + }).then(function(results) { record.loaded = true; self.on_show_data(results, record.id); }); |
