summaryrefslogtreecommitdiff
path: root/addons/base_dashboard/controllers/main.py
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2011-05-02 16:39:52 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2011-05-02 16:39:52 +0200
commit9f62f30f144d4e9b6a0dca16782b54ac44e2b8fc (patch)
treeb91abfea585287071042807f703b5f017ddc1a08 /addons/base_dashboard/controllers/main.py
parentbbb6ed05ef5a70ac4b8e8fde1426f0271bce761c (diff)
parentd31fb15a73ab2e07a3fd84a9b3468dd969736a51 (diff)
[MERGE] Dashboard branch.
bzr revid: nicolas.vanhoren@openerp.com-20110502143952-rgmw9v84rnjqxq23
Diffstat (limited to 'addons/base_dashboard/controllers/main.py')
-rw-r--r--addons/base_dashboard/controllers/main.py17
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