diff options
| author | Adrien Widart <awt@odoo.com> | 2020-11-19 13:29:27 +0000 |
|---|---|---|
| committer | Adrien Widart <awt@odoo.com> | 2020-11-19 13:35:46 +0000 |
| commit | a2d2006f24f56e16007a62cdec5af32a03f5552a (patch) | |
| tree | b54a42b5be6fba15ae62dc69f05235ab0a66c9c5 /addons/board | |
| parent | 72ec1a44eac98f515380e9d4dc6d8d3a5d676b34 (diff) | |
[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: adwid <adwid@users.noreply.github.com>
Diffstat (limited to 'addons/board')
| -rw-r--r-- | addons/board/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 ? |
