bus/controllers/main.py

14 lines
487 B
Python
Raw Normal View History

2024-05-21 15:09:16 +03:00
# Part of Talisman . See LICENSE file for full copyright and licensing details.
2024-05-03 15:03:07 +03:00
import json
from odoo.http import Controller, request, route
class BusController(Controller):
@route('/bus/get_model_definitions', methods=['POST'], type='http', auth='user')
def get_model_definitions(self, model_names_to_fetch, **kwargs):
return request.make_response(json.dumps(
request.env['ir.model']._get_model_definitions(json.loads(model_names_to_fetch)),
))