[FIX] document_page: allow other users than administrator to create menu to a static page

User should be at least have Configuration settings group to be allowed to create actions. Basic document page users do not have this rights, therefore we temporary give superuser_id to create the action

This is related to rev 133c5033a0
This commit is contained in:
Denis Ledoux 2014-06-05 15:53:28 +02:00
parent d66c96ffa9
commit 7129ec957a
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ class document_page_create_menu(osv.osv_memory):
value['domain'] = "[('parent_id','=',%d)]" % (page.id)
value['res_id'] = page.id
action_id = obj_action.create(cr, uid, value)
action_id = obj_action.create(cr, SUPERUSER_ID, value)
# only the super user is allowed to create menu due to security rules on ir.values
menu_id = obj_menu.create(cr, SUPERUSER_ID, {
'name': data.menu_name,