[MERGE] https://code.launchpad.net/~openerp-dev/openobject-server/trunk-dev-framework up to rev2125
bzr revid: stephane@openerp.com-20100318152933-g79smx2hob9vcf3p
This commit is contained in:
@@ -100,11 +100,7 @@ class ir_ui_menu(osv.osv):
|
||||
|
||||
if menu.action:
|
||||
# we check if the user has access to the action of the menu
|
||||
#m, oid = menu.action.split(',', 1)
|
||||
#data = self.pool.get(m).browse(cr, 1, int(oid))
|
||||
data = menu.action
|
||||
m = data._name
|
||||
|
||||
if data:
|
||||
model_field = { 'ir.actions.act_window': 'res_model',
|
||||
'ir.actions.report.custom': 'model',
|
||||
@@ -113,7 +109,7 @@ class ir_ui_menu(osv.osv):
|
||||
'ir.actions.server': 'model_id',
|
||||
}
|
||||
|
||||
field = model_field.get(m)
|
||||
field = model_field.get(menu.action._name)
|
||||
if field and data[field]:
|
||||
if not modelaccess.check(cr, uid, data[field], raise_exception=False):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user