Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-572576-msh 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-572576-msh/+merge/98346

Hello,

Fixed the issue of new tab & old tab, here when user have object buttons which 
returns ir.actions.atc_window so here act_window_opener will be called which 
changes the active_id of response header with _terp_id of saved record, so here 
every time active_id is changed so when openAction method of openerp.base.js is 
called it will edit the record with wrong active_id.

If user clicks the object button and if it opens the new tab then it will have 
active_model = 'ir.ui.menu' but if user click button and it opens the wizard 
and then that wizard opens new tab then active_model will be changed to current 
model. hence check if active_model == ir.ui.menu then and then we would like 
refresh the previous tab, otherwise not.

Following are the behaviour which needs to check here.

1. Create sale order, confirm it and create final invoice, which will open new 
tab so the previous tab should not be blank form and should not changed with 
another record. 

2. create opportunity and without saving the opportunity click "Schedule 
Meeting" object button which will open new tab, so here previous tab should be 
refreshed to show the user the record have been saved.

3. create sale order -> confirm it -> create advance invoice -> here it will 
also opens new tab but the record in previous tab should not be changed.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-572576-msh/+merge/98346
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-572576-msh.
=== 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-03-20 06:44:18 +0000
@@ -346,7 +346,7 @@
     # 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', {}):
+        if getattr(cherrypy.request.params, 'context', {}) and getattr(cherrypy.request.params, 'context', {}).get('active_model') == 'ir.ui.menu':
             cherrypy.response.headers['active_id'] = cherrypy.request.params.get('_terp_id')\
             or cherrypy.request.params.context.get('active_id')
 

_______________________________________________
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

Reply via email to