summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/services/data_manager.js
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-06-03 14:26:20 +0000
committerJeremy Kersten <jke@odoo.com>2019-06-05 05:56:33 +0000
commit72f7139f52a2702ced50730916fe3972bd2d8f09 (patch)
tree2b9aa97807d03dad4c175339d8027f63fa90859f /addons/web/static/src/js/services/data_manager.js
parent73327db0656bfdd2bce2a69ca1c5c07ad3d3b763 (diff)
[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
Diffstat (limited to 'addons/web/static/src/js/services/data_manager.js')
-rw-r--r--addons/web/static/src/js/services/data_manager.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/services/data_manager.js b/addons/web/static/src/js/services/data_manager.js
index 4d66a59eac2..45374d4833b 100644
--- a/addons/web/static/src/js/services/data_manager.js
+++ b/addons/web/static/src/js/services/data_manager.js
@@ -42,7 +42,7 @@ return core.Class.extend({
var self = this;
var key = this._gen_key(action_id, additional_context || {});
- if (config.debug === 'assets' || !this._cache.actions[key]) {
+ if (config.isDebug('assets') || !this._cache.actions[key]) {
this._cache.actions[key] = rpc.query({
route: "/web/action/load",
params: {
@@ -82,7 +82,7 @@ return core.Class.extend({
var views_descr = params.views_descr;
var key = this._gen_key(model, views_descr, options || {}, context);
- if (config.debug === 'assets' || !this._cache.views[key]) {
+ if (config.isDebug('assets') || !this._cache.views[key]) {
// Don't load filters if already in cache
var filters_key;
if (options.load_filters) {
@@ -137,7 +137,7 @@ return core.Class.extend({
*/
load_filters: function (params) {
var key = this._gen_key(params.modelName, params.actionId);
- if (config.debug === 'assets' || !this._cache.filters[key]) {
+ if (config.isDebug('assets') || !this._cache.filters[key]) {
this._cache.filters[key] = rpc.query({
args: [params.modelName, params.actionId],
kwargs: {