diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2011-05-02 16:39:52 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2011-05-02 16:39:52 +0200 |
| commit | 9f62f30f144d4e9b6a0dca16782b54ac44e2b8fc (patch) | |
| tree | b91abfea585287071042807f703b5f017ddc1a08 /addons/base_dashboard/controllers/main.py | |
| parent | bbb6ed05ef5a70ac4b8e8fde1426f0271bce761c (diff) | |
| parent | d31fb15a73ab2e07a3fd84a9b3468dd969736a51 (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.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 |
