mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-26 22:12:03 +02:00
Initial commit: Sale packages
This commit is contained in:
commit
14e3d26998
6469 changed files with 2479670 additions and 0 deletions
26
odoo-bringout-oca-ocb-sale/sale/controllers/onboarding.py
Normal file
26
odoo-bringout-oca-ocb-sale/sale/controllers/onboarding.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# -*- 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('/sales/sale_quotation_onboarding_panel', auth='user', type='json')
|
||||
def sale_quotation_onboarding(self):
|
||||
""" Returns the `banner` for the sale onboarding panel.
|
||||
It can be empty if the user has closed it or if he doesn't have
|
||||
the permission to see it. """
|
||||
|
||||
company = request.env.company
|
||||
if not request.env.is_admin() or \
|
||||
company.sale_quotation_onboarding_state == 'closed':
|
||||
return {}
|
||||
|
||||
return {
|
||||
'html': request.env['ir.qweb']._render('sale.sale_quotation_onboarding_panel', {
|
||||
'company': company,
|
||||
'state': company.get_and_update_sale_quotation_onboarding_state()
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue