From de27eaa97161abb06c717a36b7ed68d6f36e4e73 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Thu, 21 Dec 2017 11:15:44 +0100 Subject: [FIX] web: config.debug and session.debug equivalence Before this rev., config.debug was always a boolean, whereas it should also encode the special value 'assets', as done in session. --- addons/web/static/src/js/services/config.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'addons/web/static/src/js/services') diff --git a/addons/web/static/src/js/services/config.js b/addons/web/static/src/js/services/config.js index 04002b1b381..8a42e755322 100644 --- a/addons/web/static/src/js/services/config.js +++ b/addons/web/static/src/js/services/config.js @@ -10,14 +10,19 @@ odoo.define('web.config', function (require) { * this file someday. */ +var debugParam = $.deparam($.param.querystring()).debug; +var debug = false; +if (debugParam !== undefined) { + debug = debugParam === 'assets' ? 'assets' : true; +} + var config = { /** - * debug is a boolean flag. It is only considered true if the flag is set - * in the url + * debug can be either a boolean, or the special value 'assets' * - * @type Boolean + * @type boolean|string */ - debug: ($.deparam($.param.querystring()).debug !== undefined), + debug: debug, device: { /** * touch is a boolean, true if the device supports touch interaction -- cgit v1.2.3