From 9b77d76e71a55bfc3caba6377cee6370941c5e65 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 13 Jul 2016 15:27:47 +0200 Subject: [FIX] web,website,point_of_sale: session.debug value Now that the debug URL parameter can be equal to "assets", the session debug variable has to be updated to not only be true or false. Now, its value is false if the debug parameter is not specified in the url and a the URL parameter string value otherwise (or 1 if the value is an empty string). Also modify all redirection which kept the debug mode to also keep =assets. Use the $.param.querystring function. --- addons/web/static/src/js/framework/session.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/framework') diff --git a/addons/web/static/src/js/framework/session.js b/addons/web/static/src/js/framework/session.js index 2e643637052..fa83bf79044 100644 --- a/addons/web/static/src/js/framework/session.js +++ b/addons/web/static/src/js/framework/session.js @@ -32,7 +32,8 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { this.avoid_recursion = false; this.use_cors = options.use_cors || false; this.setup(origin); - this.debug = ($.deparam($.param.querystring()).debug !== undefined); + var debug_param = $.deparam($.param.querystring()).debug; + this.debug = (debug_param !== undefined ? debug_param || 1 : false); // for historic reasons, the session requires a name to properly work // (see the methods get_cookie and set_cookie). We should perhaps -- cgit v1.2.3