diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e638ae70e..367dea5f5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -5,7 +5,6 @@ exclude: |
^base_rest_auth_api_key/|
^base_rest_pydantic/|
^extendable/|
- ^fastapi/|
^pydantic/|
^rest_log/|
# END NOT INSTALLABLE ADDONS
diff --git a/fastapi/README.rst b/fastapi/README.rst
index 3fcc9cf45..fd842f62d 100644
--- a/fastapi/README.rst
+++ b/fastapi/README.rst
@@ -21,13 +21,13 @@ Odoo FastAPI
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github
- :target: https://github.com/OCA/rest-framework/tree/18.0/fastapi
+ :target: https://github.com/OCA/rest-framework/tree/19.0/fastapi
:alt: OCA/rest-framework
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/rest-framework-18-0/rest-framework-18-0-fastapi
+ :target: https://translation.odoo-community.org/projects/rest-framework-19-0/rest-framework-19-0-fastapi
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
- :target: https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=18.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&target_branch=19.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -449,7 +449,7 @@ handler.
.. code:: python
- from odoo.addons.base.models.res_partner import Partner
+ from odoo.addons.base.models.res_partner import ResPartner as Partner
@demo_api_router.get("/partners", response_model=list[PartnerInfo])
@@ -1636,7 +1636,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues This addon provides the basis to smoothly integrate the
FastAPI framework into Odoo. This integration allows you to use all the goodies from
@@ -818,7 +818,7 @@ Odoo FastAPI
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ef181029fc269ba5b6364530192a725c5f3392bc026ef9d5fcf47f9e43ec888a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
The authentication mechanism<
‘authenticated_partner’ dependency as a parameter of your route
handler.
-from odoo.addons.base.models.res_partner import Partner +from odoo.addons.base.models.res_partner import ResPartner as Partner @demo_api_router.get("/partners", response_model=list[PartnerInfo]) @@ -1937,7 +1937,7 @@Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.
+feedback.Do not contact contributors directly about support or help with technical issues.
@@ -1965,7 +1965,7 @@diff --git a/fastapi/tests/common.py b/fastapi/tests/common.py index f9c05b67e..345e45169 100644 --- a/fastapi/tests/common.py +++ b/fastapi/tests/common.py @@ -14,8 +14,8 @@ from odoo.tests import tagged from odoo.tests.common import TransactionCase -from odoo.addons.base.models.res_partner import Partner -from odoo.addons.base.models.res_users import Users +from odoo.addons.base.models.res_partner import ResPartner as Partner +from odoo.addons.base.models.res_users import ResUsers as Users from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient diff --git a/fastapi/views/fastapi_endpoint.xml b/fastapi/views/fastapi_endpoint.xml index 77b04fd9b..82df080a7 100644 --- a/fastapi/views/fastapi_endpoint.xml +++ b/fastapi/views/fastapi_endpoint.xml @@ -72,13 +72,8 @@ name="inactive" domain="[('active','=',False)]" /> -Maintainers
promote its widespread use.Current maintainer:
-This module is part of the OCA/rest-framework project on GitHub.
+This module is part of the OCA/rest-framework project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
- +- + diff --git a/fastapi/views/fastapi_menu.xml b/fastapi/views/fastapi_menu.xml index 90fa87cf1..a3e9a7cfa 100644 --- a/fastapi/views/fastapi_menu.xml +++ b/fastapi/views/fastapi_menu.xml @@ -6,6 +6,6 @@ FastAPI fastapi,static/description/icon.png -+ diff --git a/requirements.txt b/requirements.txt index 69f99aad8..bcba9b734 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,6 @@ # generated from manifests external_dependencies a2wsgi>=1.10.6 -apispec -cerberus -contextvars -extendable>=0.0.4 fastapi>=0.110.0 parse-accept-language -pydantic>=2.0.0 -pyquerystring python-multipart -typing-extensions ujson diff --git a/test-requirements.txt b/test-requirements.txt index cf108f84e..a79f182c5 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,3 @@ odoo_test_helper httpx +odoo-addon-endpoint_route_handler@git+https://github.com/OCA/web-api.git@refs/pull/117/head#subdirectory=endpoint_route_handler