diff options
| author | Raphael Collet <rco@openerp.com> | 2016-08-05 12:42:00 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2016-08-31 17:21:55 +0200 |
| commit | 16696b2a05529a7cd3d4b9e20ee89a575f3cd9e2 (patch) | |
| tree | f9a16a07f8858f83985a60562f270993363028f3 /addons/web/static | |
| parent | 604a1c5fcd00674e841f073570979c4c6e5ab621 (diff) | |
[FIX] openerp, web: make `execute` and `call_kw` invoke methods in the new API
Also refactor the test to prevent private methods to be remotely called.
Diffstat (limited to 'addons/web/static')
| -rw-r--r-- | addons/web/static/src/js/web_client.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/web/static/src/js/web_client.js b/addons/web/static/src/js/web_client.js index 5fc1f3f2796..c6033d6cbad 100644 --- a/addons/web/static/src/js/web_client.js +++ b/addons/web/static/src/js/web_client.js @@ -67,9 +67,9 @@ return AbstractWebClient.extend({ logo_edit: function(ev) { var self = this; ev.preventDefault(); - self.alive(new Model("res.users").get_func("read")(session.uid, ["company_id"])).then(function(res) { + self.alive(new Model("res.users").call("read", [[session.uid], ["company_id"]])).then(function(data) { self.rpc("/web/action/load", { action_id: "base.action_res_company_form" }).done(function(result) { - result.res_id = res.company_id[0]; + result.res_id = data[0].company_id[0]; result.target = "new"; result.views = [[false, 'form']]; result.flags = { @@ -94,7 +94,8 @@ return AbstractWebClient.extend({ var state = $.bbq.getState(true); if (_.isEmpty(state) || state.action === "login") { self.menu.is_bound.done(function() { - new Model("res.users").call("read", [session.uid, ["action_id"]]).done(function(data) { + new Model("res.users").call("read", [[session.uid], ["action_id"]]).done(function(result) { + var data = result[0]; if(data.action_id) { self.action_manager.do_action(data.action_id[0]); self.menu.open_action(data.action_id[0]); |
