summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-01-31 10:38:34 +0000
committerMartin Trigaux <mat@odoo.com>2019-01-31 10:41:33 +0000
commit6b054f26409af944a5c5e762cc45d51938f2640b (patch)
tree7c2f6b4c18b83fc12e282ed2e48fe11b4cc4b629 /addons/web/static/src/js
parent6ca2563155a5343c4dc8af05e20e2debb9438db3 (diff)
[FIX] web: do not select disabled element
If xlwt is not installed on the server, the option is disabled. However, the first element was checked, even if it is disabled. Trying to export record without xlwt was causing a traceback. Introduced at b60de0db41b where xls is now the first choice closes odoo/odoo#30724
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/widgets/data_export.js2
1 files changed, 1 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 d05bf2d33fc..347769b4042 100644
--- a/addons/web/static/src/js/widgets/data_export.js
+++ b/addons/web/static/src/js/widgets/data_export.js
@@ -311,7 +311,7 @@ var DataExport = Dialog.extend({
});
self.$export_format_inputs = $fmts.find('input');
- self.$export_format_inputs.first().prop('checked', true);
+ self.$export_format_inputs.filter(':enabled').first().prop('checked', true);
}
},
show_exports_list: function() {