diff options
Diffstat (limited to 'addons/base_dashboard/controllers/main.py')
| -rw-r--r-- | addons/base_dashboard/controllers/main.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/addons/base_dashboard/controllers/main.py b/addons/base_dashboard/controllers/main.py new file mode 100644 index 00000000000..a223deda6be --- /dev/null +++ b/addons/base_dashboard/controllers/main.py @@ -0,0 +1,17 @@ +from base.controllers.main import View, clean_action +import openerpweb + +class Dashboard(View): + _cp_path = "/base_dashboard/dashboard" + + @openerpweb.jsonrequest + def load(self, req, node_attrs): + + action_id = int(node_attrs['name']) + actions = req.session.model('ir.actions.actions') + result = actions.read([action_id],['type'], req.session.context) + if not result: + raise _('Action not found!') + action = req.session.model(result[0]['type']).read([action_id], False, req.session.context)[0] + clean_action(action, req.session) + return {'action': action}
\ No newline at end of file |
