summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorVidhin Mehta (OpenERP) <vme@tinyerp.com>2013-12-20 13:04:14 +0530
committerVidhin Mehta (OpenERP) <vme@tinyerp.com>2013-12-20 13:04:14 +0530
commitf12a8e94ac0fc74b80babaac6f04adc5d55178b4 (patch)
treea23f30ed86e63ec97bc86ca82bb38fa818c3316f /addons/web/static/src
parent5e5483bde4bb6329aab389f68f09121426e43312 (diff)
parent1e3ebc028544f5e5c85191168630b3e11106e286 (diff)
[MERGE]Trunk.
bzr revid: vme@tinyerp.com-20131220073414-spf39j62hv7btxt9
Diffstat (limited to 'addons/web/static/src')
-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 a87af20af69..ce4a2c0f5be 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -260,7 +260,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 4c114e28fe8..22ca70ebbf7 100644
--- a/addons/web/static/src/js/openerpframework.js
+++ b/addons/web/static/src/js/openerpframework.js
@@ -1155,7 +1155,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 63aba1dbde5..62f008d4ae4 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -1393,25 +1393,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 || {});