Steps to reproduce:
- install Calendar and Appointments apps;
- give "Access Rights" for administration to a user;
- go to calendar app with this user.
Issue:
The user does not have access to the calendar.
Cause:
The user has no access rights for the onboarding model.
Solution:
Check that the user belongs to the "group_system" group in the onboarding model controller.
opw-3083014
closes odoo/odoo#107514
X-original-commit: fa7dc387154c65ef07af1f903fa25ca5d2e890f9
Signed-off-by: Arnaud Joset <arj@odoo.com>
23 lines
892 B
Python
23 lines
892 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import http
|
|
from odoo.http import request
|
|
|
|
|
|
class OnboardingController(http.Controller):
|
|
@http.route('/onboarding/<string:route_name>', auth='user', type='json')
|
|
def get_onboarding_data(self, route_name=None):
|
|
if not request.env.user.has_group('base.group_system'):
|
|
return {}
|
|
|
|
onboarding = request.env['onboarding.onboarding'].search([('route_name', '=', route_name)])
|
|
if onboarding and not onboarding._search_or_create_progress().is_onboarding_closed:
|
|
# JS implementation of the onboarding panel expects this data structure
|
|
return {
|
|
'html': request.env['ir.qweb']._render(
|
|
'onboarding.onboarding_panel', onboarding._prepare_rendering_values())
|
|
}
|
|
|
|
return {}
|