diff options
| author | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2011-10-25 16:55:48 +0530 |
|---|---|---|
| committer | Vidhin Mehta (OpenERP) <vme@tinyerp.com> | 2011-10-25 16:55:48 +0530 |
| commit | c17c8a0bd10d5c9cedd6c34bc0110c02ecdcd6b2 (patch) | |
| tree | b4543c28941307f8ebdd60191f2eb2494139aad2 /addons/web_dashboard/controllers.py | |
| parent | 1ee677eadbfa3e4c7d9836c48bea735f41f6a5a7 (diff) | |
| parent | 55ad46220db83d2f5d6dd86d243d0d9843b74511 (diff) | |
[IMP]merge with main branch of view editor.
bzr revid: vme@tinyerp.com-20111025112548-eakr7fio6diovn2m
Diffstat (limited to 'addons/web_dashboard/controllers.py')
| -rw-r--r-- | addons/web_dashboard/controllers.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/addons/web_dashboard/controllers.py b/addons/web_dashboard/controllers.py index ebf74837899..0f6ae5dad7d 100644 --- a/addons/web_dashboard/controllers.py +++ b/addons/web_dashboard/controllers.py @@ -22,11 +22,7 @@ class Widgets(openerpweb.Controller): _cp_path = '/web_dashboard/widgets' @openerpweb.httprequest - def content(self, req, widget_id): - Widget = req.session.model('res.widget') - w = Widget.read([widget_id], ['content'], req.session.eval_context(req.context)) - if w: - r = WIDGET_CONTENT_PATTERN % w[0] - else: - r = "Widget unavailable" - return r + def content(self, request, widget_id): + return WIDGET_CONTENT_PATTERN % request.session.model('res.widget').read( + [int(widget_id)], ['content'], request.session.eval_context(request.context) + )[0] |
