Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1 @@
from . import fastapi_endpoint_demo

View file

@ -0,0 +1,20 @@
# Copyright 2023 ACSONE SA/NV
# License LGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
from fastapi import APIRouter
from ..tests.routers import demo_pydantic_router
class FastapiEndpoint(models.Model):
_inherit = "fastapi.endpoint"
def _get_fastapi_routers(self) -> list[APIRouter]:
# Add router defined for tests to the demo app
routers = super()._get_fastapi_routers()
if self.app == "demo":
routers.append(demo_pydantic_router)
return routers