Merge lp:~openerp-dev/openobject-client-web/6.0-opw-573605-cpa into lp:openobject-client-web

Proposed by Chirag Patel (OpenERP)
Status: Merged
Approved by: Xavier ALT
Approved revision: 4802
Merged at revision: 4874
Proposed branch: lp:~openerp-dev/openobject-client-web/6.0-opw-573605-cpa
Merge into: lp:openobject-client-web
Diff against target: 13 lines (+3/-0)
1 file modified
addons/openerp/controllers/actions.py (+3/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client-web/6.0-opw-573605-cpa
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+101519@code.launchpad.net

Description of the change

Hello,

Handling of external links in list view button url action.

Demo:
1. Add one button in list view.
2. Set type, url and target.

Observed: When click on button, not open given url.
Expected: Button should be open given url in new tab.

Thanks.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/openerp/controllers/actions.py'
2--- addons/openerp/controllers/actions.py 2011-11-15 14:17:31 +0000
3+++ addons/openerp/controllers/actions.py 2012-04-11 09:38:23 +0000
4@@ -406,6 +406,9 @@
5 # determine target for openAction()
6 target = {'new': 'popup'}.get(data['target'], 'iframe')
7
8+ cherrypy.response.headers['X-Target'] = target
9+ cherrypy.response.headers['Location'] = url
10+
11 return """<script type="text/javascript">
12 openAction('%s', '%s')
13 </script>