[FIX] board: board creation of users other than admin.
It wasn't possible to create a new dashboard, as a user other than SUPERUSER_ID, using the "Create board" menu specifically Reporting > Configuration > Create Board (Technical Features & Administration > Settings groups required) Because it creates a new menu for this dashboard, which lead to the automatic creation of an "ir.values" record which is prevented for other users than SUPERUSER_ID opw-629367
This commit is contained in:
parent
31194a59fb
commit
1628050030
|
@ -23,7 +23,7 @@
|
|||
from operator import itemgetter
|
||||
from textwrap import dedent
|
||||
|
||||
from openerp import tools
|
||||
from openerp import tools, SUPERUSER_ID
|
||||
from openerp.osv import fields, osv
|
||||
|
||||
class board_board(osv.osv):
|
||||
|
@ -144,7 +144,7 @@ class board_create(osv.osv_memory):
|
|||
''')
|
||||
}, context=context)
|
||||
|
||||
menu_id = self.pool.get('ir.ui.menu').create(cr, uid, {
|
||||
menu_id = self.pool.get('ir.ui.menu').create(cr, SUPERUSER_ID, {
|
||||
'name': this.name,
|
||||
'parent_id': this.menu_parent_id.id,
|
||||
'action': 'ir.actions.act_window,%s' % (action_id,)
|
||||
|
|
Loading…
Reference in New Issue