Skip to content
Snippets Groups Projects
Commit a2d2006f authored by Adrien Widart's avatar Adrien Widart
Browse files

[FIX] board: user can add to his dashboard


A user without admin access cannot add any views to his dashboard

To reproduce the error:
1. Connect using an account without admin rights
2. Go to CRM (for instance)
3. Favorites > Add to my dashboard
4. Set name & Save

=> An AccessError is raised

A user should be able to add some views to his dashboard.

OPW-2382713

closes odoo/odoo#62019

Signed-off-by: default avataradwid <adwid@users.noreply.github.com>
parent 72ec1a44
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ class Board(Controller):
@route('/board/add_to_dashboard', type='json', auth='user')
def add_to_dashboard(self, action_id, context_to_save, domain, view_mode, name=''):
# Retrieve the 'My Dashboard' action from its xmlid
action = request.env.ref('board.open_board_my_dash_action')
action = request.env.ref('board.open_board_my_dash_action').sudo()
if action and action['res_model'] == 'board.board' and action['views'][0][1] == 'form' and action_id:
# Maybe should check the content instead of model board.board ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment