summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome/view_manager.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-02-23 10:36:13 +0100
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commit136292f6890ff730b5a9fd70eb503d4f6a0f9c4a (patch)
tree3ded3049b78c6c901acbdd1b5609d9f77bfd2b3e /addons/web/static/src/js/chrome/view_manager.js
parent173896b62d2c2d3c4acc6be75c3396b29887e4fb (diff)
[REF] web, *: move CompoundContext out of data.js
We want to remove data.js, but we still need the CompoundContext class, so we take it out, and rename it 'Context'
Diffstat (limited to 'addons/web/static/src/js/chrome/view_manager.js')
-rw-r--r--addons/web/static/src/js/chrome/view_manager.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/src/js/chrome/view_manager.js b/addons/web/static/src/js/chrome/view_manager.js
index 5b30d1a3c5c..0566b3042be 100644
--- a/addons/web/static/src/js/chrome/view_manager.js
+++ b/addons/web/static/src/js/chrome/view_manager.js
@@ -1,6 +1,7 @@
odoo.define('web.ViewManager', function (require) {
"use strict";
+var Context = require('web.Context');
var ControlPanelMixin = require('web.ControlPanelMixin');
var core = require('web.core');
var data = require('web.data');
@@ -538,7 +539,7 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
do_execute_action: function (action_data, model, record_id, on_closed) {
var self = this;
var result_handler = on_closed || function () {};
- var context = new data.CompoundContext(this.env.context, action_data.context || {});
+ var context = new Context(this.env.context, action_data.context || {});
// response handler
var handler = function (action) {
@@ -546,7 +547,7 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
// filter out context keys that are specific to the current action.
// Wrong default_* and search_default_* values will no give the expected result
// Wrong group_by values will simply fail and forbid rendering of the destination view
- var ncontext = new data.CompoundContext(
+ var ncontext = new Context(
_.object(_.reject(_.pairs(self.env.context), function(pair) {
return pair[0].match('^(?:(?:default_|search_default_|show_).+|.+_view_ref|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
}))