From 72f7139f52a2702ced50730916fe3972bd2d8f09 Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Mon, 3 Jun 2019 14:26:20 +0000 Subject: [IMP] *: use new helper config.isDebug() Before this commit, both config and session were aliases to odoo.debug. Now, config.isDebug() should be call, with possibility to pass a parameter to check if we are in a specific debug mode such as 'tests' or 'assets'. task-1934445 Coming with https://github.com/odoo/enterprise/pull/4281 Closes https://github.com/odoo/odoo/pull/33213 --- addons/web/static/src/js/widgets/data_export.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'addons/web/static/src/js/widgets/data_export.js') diff --git a/addons/web/static/src/js/widgets/data_export.js b/addons/web/static/src/js/widgets/data_export.js index a913fcd0ea2..6903e7fea33 100644 --- a/addons/web/static/src/js/widgets/data_export.js +++ b/addons/web/static/src/js/widgets/data_export.js @@ -1,6 +1,7 @@ odoo.define('web.DataExport', function (require) { "use strict"; +var config = require('web.config'); var core = require('web.core'); var crash_manager = require('web.crash_manager'); var Dialog = require('web.Dialog'); @@ -240,11 +241,11 @@ var DataExport = Dialog.extend({ .find('.o_expand_parent') .toggleClass('fa-chevron-right fa-chevron-down') .next() - .after(QWeb.render('Export.TreeItems', {fields: records, debug: this.getSession().debug})); + .after(QWeb.render('Export.TreeItems', {fields: records, debug: config.isDebug()})); } else { this.$('.o_left_field_panel').empty().append( $('
').addClass('o_field_tree_structure') - .append(QWeb.render('Export.TreeItems', {fields: records, debug: this.getSession().debug})) + .append(QWeb.render('Export.TreeItems', {fields: records, debug: config.isDebug()})) ); } -- cgit v1.2.3