summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-05-29 14:09:18 +0200
committerGéry Debongnie <ged@odoo.com>2017-05-29 16:20:45 +0200
commit5788ee8a1cc903431b100a3861686cfa606aa620 (patch)
tree9b43cb850aecf13f410d7418de66c4fdde6f9730 /addons/web/static/src/js/widgets
parent0bb3f21964219073a261b493a2d24560609987c3 (diff)
[FIX] web: prevent crash when exporting all data
In the list controller, some code to determine the active domain to export was causing a crash. It was easy to see: just select all records in a list view, then click on 'Export' in the sidebar. Note that the data_export code is still quite old, and did evolve organically. It does not conform to our new design principles, in particular, the way component should communicate. But this is a task for another day.
Diffstat (limited to 'addons/web/static/src/js/widgets')
-rw-r--r--addons/web/static/src/js/widgets/data_export.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/widgets/data_export.js b/addons/web/static/src/js/widgets/data_export.js
index 13ab8fd0892..c11551ca2cc 100644
--- a/addons/web/static/src/js/widgets/data_export.js
+++ b/addons/web/static/src/js/widgets/data_export.js
@@ -295,7 +295,10 @@ var DataExport = Dialog.extend({
}
var self = this;
- return this.exports.read_slice(['name'], {
+ return this._rpc({
+ model: 'ir.exports',
+ method: 'search_read',
+ fields: ['name'],
domain: [['resource', '=', this.record.model]]
}).then(function (export_list) {
if (!export_list.length) {