Merge lp:~openerp-dev/openobject-client-web/6.0-bug-16165-msh into lp:openobject-client-web

Proposed by Xavier (Open ERP)
Status: Rejected
Rejected by: Anup(SerpentCS)
Proposed branch: lp:~openerp-dev/openobject-client-web/6.0-bug-16165-msh
Merge into: lp:openobject-client-web
Prerequisite: lp:~openerp-dev/openobject-client-web/6.0-bug-6179-msh
Diff against target: 38 lines (+10/-4)
1 file modified
addons/openerp/controllers/actions.py (+10/-4)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client-web/6.0-bug-16165-msh
Reviewer Review Type Date Requested Status
Anup(SerpentCS) (community) Disapprove
Review via email: mp+69269@code.launchpad.net

Description of the change

Hello,

Changed the code so that when record opened in new tab at that time menu remains persistent, before that when record was opened in new tab menu were changed and by default sale menu came. This was handled by revision no. 4642 but due to this revision issue 16165 was arise i.e. parent_id not found that is because we are setting id of data in active_id of context so according to revision 4642 the code will make rpc call with active_id of context for fetching menu id which is actually id of data.

Thanx.

To post a comment you must log in.
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Mohammed,Xavier,

The issue has been fixed by revision 4676 <email address hidden> in the stable v6.

Hence for the shake of clarity I am rejecting this branch.

Thanks.

review: Disapprove

Unmerged revisions

4671. By Mohammed Shekha(Open ERP)

[FIX] Fix the issues related to active_id

4670. By Mohammed Shekha(Open ERP)

[FIX] Fixed the issue of readonly button when form is not saved in o2m

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-05-23 13:07:54 +0000
3+++ addons/openerp/controllers/actions.py 2011-07-26 12:43:45 +0000
4@@ -198,7 +198,7 @@
5 if not action.get('opened'):
6 action.setdefault('target', 'current')
7 return act_window_opener(action, data)
8-
9+
10 for key in ('res_id', 'res_model', 'view_type',
11 'view_mode', 'limit', 'search_view'):
12 data[key] = action.get(key, data.get(key))
13@@ -226,7 +226,13 @@
14 view_ids = [action['view_id'][0]]
15 if not action.get('domain'):
16 action['domain'] = '[]'
17-
18+
19+ global menu_id
20+ menu_id = False
21+
22+ if not data['context'].get('active_id'):
23+ menu_id = data.get('id', False)
24+
25 ctx = dict(data.get('context', {}),
26 active_id=data.get('id', False),
27 active_ids=data.get('ids', []),
28@@ -367,8 +373,8 @@
29
30 if open_new_tab:
31 parent_id = False
32- if data['context'] and data['context'].get('active_id') and not data.get('model'):
33- parent = rpc.RPCProxy('ir.ui.menu').read([int(data['context']['active_id'])],['complete_name'], rpc.session.context)[0]['complete_name'].split('/')[0]
34+ if menu_id:
35+ parent = rpc.RPCProxy('ir.ui.menu').read([int(menu_id)],['complete_name'], rpc.session.context)[0]['complete_name'].split('/')[0]
36 parent_id = rpc.RPCProxy('ir.ui.menu').search([('name','=', parent),('parent_id','=',False)],0,0,0, rpc.session.context)
37 if parent_id:
38 url = '/openerp/?' + urllib.urlencode({'active': parent_id[0],'next': url})