diff options
| author | vda (OpenERP) <vda@tinyerp.com> | 2011-04-27 15:54:56 +0530 |
|---|---|---|
| committer | vda (OpenERP) <vda@tinyerp.com> | 2011-04-27 15:54:56 +0530 |
| commit | 023119776de85a8274f88941adeb577a773ac00a (patch) | |
| tree | 681a78071cecae21c72c9817b7d37ac0debd5847 /addons/base_dashboard/controllers | |
| parent | bf5a922f889e81e1393523c3b9a3837932961b36 (diff) | |
| parent | ceb524e3376d92dde25e68dd7d74b6de0a5c8a6d (diff) | |
[MERGE] Merged latest trunk branch.Improved dashboard using addwidget api.
bzr revid: vda@tinyerp.com-20110427102456-icjhuk24ke8x8cbg
Diffstat (limited to 'addons/base_dashboard/controllers')
| -rw-r--r-- | addons/base_dashboard/controllers/main.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/addons/base_dashboard/controllers/main.py b/addons/base_dashboard/controllers/main.py index bb761a82696..72ef9b2464a 100644 --- a/addons/base_dashboard/controllers/main.py +++ b/addons/base_dashboard/controllers/main.py @@ -5,5 +5,13 @@ class Dashboard(View): _cp_path = "/base_dashboard/dashboard" @openerpweb.jsonrequest - def load(self, req, node): - return
\ No newline at end of file + def load(self, req, node_attrs): + + self.action_id = int(node_attrs['name']) + actions = req.session.model('ir.actions.actions') + result = actions.read([self.action_id],['type'], req.session.context) + if not result: + raise _('Action not found!') + self.action = req.session.model(result[0]['type']).read([self.action_id], False, req.session.context)[0] + + return {'action': self.action}
\ No newline at end of file |
