mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-22 17:32:01 +02:00
Initial commit: Core packages
This commit is contained in:
commit
12c29a983b
9512 changed files with 8379910 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import onboarding
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# -*- 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 {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue