summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/services
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-12-21 11:15:44 +0100
committerAaron Bohy <aab@odoo.com>2018-01-16 20:49:19 +0100
commitde27eaa97161abb06c717a36b7ed68d6f36e4e73 (patch)
tree2f5500a95b40e00f0ca008fdc113f92a93616384 /addons/web/static/src/js/services
parent285d95e946e5a15139c961e30dbe3598e0d99f6a (diff)
[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.
Diffstat (limited to 'addons/web/static/src/js/services')
-rw-r--r--addons/web/static/src/js/services/config.js13
1 files changed, 9 insertions, 4 deletions
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