summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2014-01-03 16:14:58 +0100
committerThibault Delavallée <tde@openerp.com>2014-01-03 16:14:58 +0100
commit3d9459ba9de2ea593f7b1642a56a65a26fa9b581 (patch)
tree03bd5d693d046044798d2bbb5d7d637fbb57e97f /addons/web/static/src/js
parent6f2e3e118f49530ae5538e775462fc675d9be793 (diff)
parentd963fa888cb767d5b3ad6275787a2324bcec1902 (diff)
[MERGE] Sync with trunk
bzr revid: tde@openerp.com-20140103151458-8hl5qlmswpxdvd7v
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/chrome.js2
-rw-r--r--addons/web/static/src/js/openerpframework.js2
-rw-r--r--addons/web/static/src/js/views.js24
3 files changed, 14 insertions, 14 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index abbd4767361..31293dab1a6 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -256,7 +256,7 @@ instance.web.CrashManager = instance.web.Class.extend({
new (handler)(this, error).display();
return;
}
- if (error.data.name === "openerp.addons.web.session SessionExpiredException") {
+ if (error.data.name === "openerp.http.SessionExpiredException") {
this.show_warning({type: "Session Expired", data: { message: _t("Your OpenERP session expired. Please refresh the current web page.") }});
return;
}
diff --git a/addons/web/static/src/js/openerpframework.js b/addons/web/static/src/js/openerpframework.js
index 352007b541e..00f6cee1c3c 100644
--- a/addons/web/static/src/js/openerpframework.js
+++ b/addons/web/static/src/js/openerpframework.js
@@ -1159,7 +1159,7 @@ openerp.Model = openerp.Class.extend({
kwargs = args;
args = [];
}
- var call_kw = _.str.sprintf('/web/dataset/call_kw/%s/%s', this.name, method);
+ var call_kw = '/web/dataset/call_kw/' + this.name + '/' + method;
return this.session().rpc(call_kw, {
model: this.name,
method: method,
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 37369377bf1..25a424394bb 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -1386,25 +1386,25 @@ instance.web.View = instance.web.Widget.extend({
return self.getParent().on_action_executed.apply(null, arguments);
}
};
- var context = dataset.get_context();
- if (action_data.model !== dataset.model) {
- // filter out context keys that are specific to the action model.
- // Wrong default_ and search_default values will no give the expected views
- // Wrong group_by values will simply fail and forbid rendering of the destination view
- context = _.object(_.reject(_.pairs(context.eval()), function(pair) {
- return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf)$') !== null;
- }));
- }
+ var context = new instance.web.CompoundContext(dataset.get_context(), action_data.context || {});
- context = new instance.web.CompoundContext(context, action_data.context || {});
+ // response handler
var handler = function (action) {
if (action && action.constructor == Object) {
- var ncontext = new instance.web.CompoundContext(context);
+ // 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 instance.web.CompoundContext(
+ _.object(_.reject(_.pairs(dataset.get_context().eval()), function(pair) {
+ return pair[0].match('^(?:(?:default_|search_default_).+|group_by|group_by_no_leaf|active_id|active_ids)$') !== null;
+ }))
+ );
+ ncontext.add(action_data.context || {});
+ ncontext.add({active_model: dataset.model});
if (record_id) {
ncontext.add({
active_id: record_id,
active_ids: [record_id],
- active_model: dataset.model
});
}
ncontext.add(action.context || {});