Fix Odoo dataset call_kw route override

This commit is contained in:
metatroncubeswdev 2026-05-07 18:00:11 -04:00
parent ad5564aaf6
commit c08f546702
2 changed files with 1 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
'name': 'Dine360 Dashboard',
'version': '1.0.2',
'version': '1.0.3',
'license': 'LGPL-3',
'category': 'Website',
'summary': 'Redirect login to home and show icon grid',

View File

@ -1,6 +1,5 @@
from odoo import http
from odoo.http import request
import json
class CorsHandler(http.Controller):
# This specifically targets the authentication endpoint for CORS
@ -9,7 +8,3 @@ class CorsHandler(http.Controller):
request.session.authenticate(db, login, password)
return request.env['ir.http'].session_info()
# Generic search_read for the dashboard apps
@http.route('/web/dataset/call_kw', type='json', auth="user", cors="*")
def call_kw_cors(self, model, method, args, kwargs, path=None):
return request.env[model].with_user(request.uid).call_kw(method, args, kwargs)