[FIX] Fixed more r.result issues.
bzr revid: vta@openerp.com-20121005113046-mwgb0pvm4bcgf875
This commit is contained in:
parent
5a971eca90
commit
dcb8a9e441
|
@ -1622,7 +1622,7 @@ class Action(openerpweb.Controller):
|
||||||
action = req.session.model(action_type).read([action_id], False, ctx)
|
action = req.session.model(action_type).read([action_id], False, ctx)
|
||||||
if action:
|
if action:
|
||||||
value = clean_action(req, action[0], do_not_eval)
|
value = clean_action(req, action[0], do_not_eval)
|
||||||
return {'result': value}
|
return value
|
||||||
|
|
||||||
@openerpweb.jsonrequest
|
@openerpweb.jsonrequest
|
||||||
def run(self, req, action_id):
|
def run(self, req, action_id):
|
||||||
|
|
|
@ -886,8 +886,8 @@ instance.web.UserMenu = instance.web.Widget.extend({
|
||||||
var self = this;
|
var self = this;
|
||||||
if (!this.getParent().has_uncommitted_changes()) {
|
if (!this.getParent().has_uncommitted_changes()) {
|
||||||
self.rpc("/web/action/load", { action_id: "base.action_res_users_my" }, function(result) {
|
self.rpc("/web/action/load", { action_id: "base.action_res_users_my" }, function(result) {
|
||||||
result.result.res_id = instance.session.uid;
|
result.res_id = instance.session.uid;
|
||||||
self.getParent().action_manager.do_action(result.result);
|
self.getParent().action_manager.do_action(result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1121,7 +1121,7 @@ instance.web.WebClient = instance.web.Client.extend({
|
||||||
var self = this;
|
var self = this;
|
||||||
return this.rpc("/web/action/load", { action_id: options.action_id })
|
return this.rpc("/web/action/load", { action_id: options.action_id })
|
||||||
.pipe(function (result) {
|
.pipe(function (result) {
|
||||||
var action = result.result;
|
var action = result;
|
||||||
if (options.needaction) {
|
if (options.needaction) {
|
||||||
action.context.search_default_needaction_pending = true;
|
action.context.search_default_needaction_pending = true;
|
||||||
}
|
}
|
||||||
|
@ -1166,7 +1166,7 @@ instance.web.EmbeddedClient = instance.web.Client.extend({
|
||||||
return $.when(this._super()).pipe(function() {
|
return $.when(this._super()).pipe(function() {
|
||||||
return instance.session.session_authenticate(self.dbname, self.login, self.key, true).pipe(function() {
|
return instance.session.session_authenticate(self.dbname, self.login, self.key, true).pipe(function() {
|
||||||
return self.rpc("/web/action/load", { action_id: self.action_id }, function(result) {
|
return self.rpc("/web/action/load", { action_id: self.action_id }, function(result) {
|
||||||
var action = result.result;
|
var action = result;
|
||||||
action.flags = _.extend({
|
action.flags = _.extend({
|
||||||
//views_switcher : false,
|
//views_switcher : false,
|
||||||
search_view : false,
|
search_view : false,
|
||||||
|
|
|
@ -231,7 +231,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||||
} else if (_.isNumber(action) || _.isString(action)) {
|
} else if (_.isNumber(action) || _.isString(action)) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return self.rpc("/web/action/load", { action_id: action }).pipe(function(result) {
|
return self.rpc("/web/action/load", { action_id: action }).pipe(function(result) {
|
||||||
return self.do_action(result.result, on_close, clear_breadcrumbs, on_reverse_breadcrumb);
|
return self.do_action(result, on_close, clear_breadcrumbs, on_reverse_breadcrumb);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!action.type) {
|
if (!action.type) {
|
||||||
|
@ -1223,7 +1223,7 @@ instance.web.View = instance.web.Widget.extend({
|
||||||
};
|
};
|
||||||
|
|
||||||
if (action_data.special) {
|
if (action_data.special) {
|
||||||
return handler({result: {"type":"ir.actions.act_window_close"}});
|
return handler({"type":"ir.actions.act_window_close"});
|
||||||
} else if (action_data.type=="object") {
|
} else if (action_data.type=="object") {
|
||||||
var args = [[record_id]], additional_args = [];
|
var args = [[record_id]], additional_args = [];
|
||||||
if (action_data.args) {
|
if (action_data.args) {
|
||||||
|
|
Loading…
Reference in New Issue