Merge lp:~openerp-dev/openobject-client-web/6.0-opw-572576-msh into lp:openobject-client-web

Proposed by Mohammed Shekha(Open ERP)
Status: Rejected
Rejected by: Xavier ALT
Proposed branch: lp:~openerp-dev/openobject-client-web/6.0-opw-572576-msh
Merge into: lp:openobject-client-web
Diff against target: 11 lines (+1/-1)
1 file modified
addons/openerp/controllers/actions.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client-web/6.0-opw-572576-msh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+98346@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Xavier ALT (dex-phx) wrote :

Hi,

I'm going to reject this one as this has been superseeded by fix of 575690 (revision: <email address hidden>)

Regards,
Xavier

Unmerged revisions

4783. By Mohammed Shekha(Open ERP)

[FIX]Fixed the issue of new tab, here old tab was refreshed with _terp_id of new tab record so each time old tab gives wrong view in form.

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-03-20 06:44:18 +0000
4@@ -346,7 +346,7 @@
5 # which pop-up new window but 'appcontent' is not reloaded
6 # for that passing active_id in headers, to get it in openAction
7 if getattr(cherrypy.request, 'params', []):
8- if getattr(cherrypy.request.params, 'context', {}):
9+ if getattr(cherrypy.request.params, 'context', {}) and getattr(cherrypy.request.params, 'context', {}).get('active_model') == 'ir.ui.menu':
10 cherrypy.response.headers['active_id'] = cherrypy.request.params.get('_terp_id')\
11 or cherrypy.request.params.context.get('active_id')
12