c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #16408
[Bug 715378] Re: POS menu redirects to sales menu
if open_new_tab:
parent_id = False
if data['context'] and data['context'].get('active_id') and not data.get('model'):
parent = rpc.RPCProxy('ir.ui.menu').read([int(data['context']['active_id'])],['complete_name'], rpc.session.context)[0]['complete_name'].split('/')[0]
parent_id = rpc.RPCProxy('ir.ui.menu').search([('name','=', parent),('parent_id','=',False)],0,0,0, rpc.session.context)
if parent_id:
url = '/openerp/?' + urllib.urlencode({'active': parent_id[0],'next': url})
else:
url = '/openerp/?' + urllib.urlencode({'next': url})
This patch create a new BUG !!
data = {'ids': [3], 'context': {'lang': u'en_US', 'project_id': False,
'tz': False, 'search_view': 843, 'active_model': 'res.partner',
'type_id': 17, 'selected_day': u'2011-02-18', '_terp_view_name':
u'Appointment from clinicien', 'active_id': 186922, 'section_id': False,
'client': 'web', 'color_values': [211026], 'color_field': u'doctor',
'patient_id': 186922, 'active_ids': [186922], 'category_id': 1,
'department_id': False}}
So, take a res.partner ID to search a ir.ui.menu ....
after a first look, i think we can change
if data['context'] and data['context'].get('active_id') and not
data.get('model'):
By
if data['context'] and data['context'].get('active_id') and
data['context'].get('active_model')=='ir.ui.menu':
Because if we have a id and model is not ir.ui.menu, we cant use this id
to search a menu,tested on my side and all work fine
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/715378
Title:
POS menu redirects to sales menu
Status in OpenERP Web Client:
Fix Released
Bug description:
If logged in as admin and I choose Point of Sales > Cash register
management > close registers, it opens a new window with the "Sales"
side menu instead of the "Point of Sales" menu.
References