update odoo customize

This commit is contained in:
ivanOffice
2023-09-14 17:08:11 +08:00
parent 45ecd5ac66
commit a4d3528454
29 changed files with 475 additions and 72 deletions

View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# todo: website 有bug oauth
from . import controllers

View File

@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import http
from odoo.addons.portal.controllers.web import Home
from odoo.http import request
class AppHome(Home):
@http.route()
def web_client(self, s_action=None, **kw):
# todo: 当前只对 web要调整为也对 website
res = super(AppHome, self).web_client(s_action, **kw)
if kw.get('debug', False):
app_debug_only_admin = 1
if request.session.uid and request.env.user.browse(request.session.uid)._is_admin():
pass
else:
if app_debug_only_admin:
return request.redirect('/web/session/logout?debug=0')
return res