[FIX] odex_web_app: remove Database name should be specified in Conf File

This commit is contained in:
Samir Ladoui 2024-08-05 09:58:02 +01:00
parent 7f94c5d686
commit e04d86439e
2 changed files with 13 additions and 13 deletions

View File

@ -1,3 +1,3 @@
from . import authentication
from . import web
# from . import web

View File

@ -3,16 +3,16 @@ from odoo import http
from odoo.http import request
class WebController(http.Controller):
@http.route('/web/session/authenticate', type='json', auth="none")
def authenticate(self, login, password, base_location=None):
db = odoo.tools.config.get('db_name')
if not db:
response_data = {
"error": "Database name should be specified in Conf File",
"status": 400
}
return response_data
# class WebController(http.Controller):
# @http.route('/web/session/authenticate', type='json', auth="none")
# def authenticate(self, login, password, base_location=None):
# db = odoo.tools.config.get('db_name')
# if not db:
# response_data = {
# "error": "Database name should be specified in Conf File",
# "status": 400
# }
# return response_data
request.session.authenticate(db, login, password)
return request.env['ir.http'].session_info()
# request.session.authenticate(db, login, password)
# return request.env['ir.http'].session_info()