Xavier ALT (OpenERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-opw-55161-xal into
lp:openobject-client-web.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-55161-xal/+merge/104735
Hi,
This fix the problem of web client try to open non existant record when a
wizard return a {'type': 'ir.actions.act_window'}.
Steps:
You can follow these steps to reproduct the issue (new DB with demo data) :
- Go to Purchase / Request for Quotation
- Open the PO0001 and duplicate them
- Return to the Request for Quotation list view
- Select PO0001 and PO0003, then click on 'Merge Purchase orders' in the right
toolbar.
- A new popup wizard is opened. Click on 'Merge orders'.
- At this time, a new tab is opened in the Web browser with the list of new
created (merged) PO.
Current: on the first (old) tab, the web client open a new empty PO form (or a
record having nothing to be with what we've done
Expected: close the popup wizard and return to the Request for Quotation list,
not to a new empty form.
Regards,
Xavier
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-55161-xal/+merge/104735
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-opw-55161-xal.
=== modified file 'addons/openerp/controllers/actions.py'
--- addons/openerp/controllers/actions.py 2011-11-15 14:17:31 +0000
+++ addons/openerp/controllers/actions.py 2012-05-04 13:30:32 +0000
@@ -342,14 +342,6 @@
# then used back as a URL
action.pop('search_view', None)
- # when perform any button action on unsaved-record which returns 'ir.action.act_window'
- # which pop-up new window but 'appcontent' is not reloaded
- # for that passing active_id in headers, to get it in openAction
- if getattr(cherrypy.request, 'params', []):
- if getattr(cherrypy.request.params, 'context', {}):
- cherrypy.response.headers['active_id'] = cherrypy.request.params.get('_terp_id')\
- or cherrypy.request.params.context.get('active_id')
-
# Add 'opened' mark to indicate we're now within the popup and can
# continue on during the second round of execution
payload = str({
=== modified file 'addons/openerp/static/javascript/openerp/openerp.base.js'
--- addons/openerp/static/javascript/openerp/openerp.base.js 2012-02-23 06:40:40 +0000
+++ addons/openerp/static/javascript/openerp/openerp.base.js 2012-05-04 13:30:32 +0000
@@ -189,6 +189,10 @@
if (terp_id) {
window.top.editRecord(terp_id);
}
+ else {
+ // no terp_id specified, simply reload the current view
+ jQuery(".active", "#view-selector").click();
+ }
break;
case 'iframe':
openLinkFrame(action_url);
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp