From 24071ff94a2361b1fdc44eff9d37f99cdef1d9be Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Thu, 19 Nov 2020 13:29:27 +0000 Subject: [PATCH] [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#62034 X-original-commit: a2d2006f24f56e16007a62cdec5af32a03f5552a Signed-off-by: adwid --- addons/board/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/board/controllers/main.py b/addons/board/controllers/main.py index 96f1aad1a0a..303f5b0908e 100644 --- a/addons/board/controllers/main.py +++ b/addons/board/controllers/main.py @@ -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 ?