[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.
This commit is contained in:
@@ -3,6 +3,7 @@ odoo.define('web.Session', function (require) {
|
||||
|
||||
var ajax = require('web.ajax');
|
||||
var concurrency = require('web.concurrency');
|
||||
var config = require('web.config');
|
||||
var core = require('web.core');
|
||||
var mixins = require('web.mixins');
|
||||
var utils = require('web.utils');
|
||||
@@ -37,8 +38,7 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, {
|
||||
this.avoid_recursion = false;
|
||||
this.use_cors = options.use_cors || false;
|
||||
this.setup(origin);
|
||||
var debug_param = $.deparam($.param.querystring()).debug;
|
||||
this.debug = (debug_param !== undefined ? debug_param || 1 : false);
|
||||
this.debug = config.debug;
|
||||
|
||||
// for historic reasons, the session requires a name to properly work
|
||||
// (see the methods get_cookie and set_cookie). We should perhaps
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user