From 85c28f6d2332ac529e3d17f7c2efe20089a0fd57 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 21 Apr 2011 15:23:54 +0200 Subject: [PATCH] [ADD] Added /base/action/load controller bzr revid: fme@openerp.com-20110421132354-ubji3zz8k181qlxu --- addons/base/controllers/main.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index f51b42fe4a6..554b04099ed 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -621,5 +621,12 @@ class Action(openerpweb.Controller): _cp_path = "/base/action" @openerpweb.jsonrequest - def load(self, req, action_id): - return {} + def load(self, req, action_id, context={}): + Actions = req.session.model('ir.actions.actions') + value = False + action_type = Actions.read([action_id], ['type'], context) + if action_type: + action = req.session.model(action_type[0]['type']).read([action_id], False, context) + if action: + value = action[0] + return {'value': value}