From 1b71ccd4fa4fc762c16179cb00243f0e409851bb Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 12 Feb 2026 13:34:15 +0000 Subject: [PATCH 01/12] [BOT] post-merge updates --- base_rest/README.rst | 2 +- base_rest/__manifest__.py | 2 +- base_rest/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base_rest/README.rst b/base_rest/README.rst index 5f93be562..921157c84 100644 --- a/base_rest/README.rst +++ b/base_rest/README.rst @@ -11,7 +11,7 @@ Base Rest !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:198b97806a0a8c480e6c8f26f3ce3199cba9978f8d152ecf93c80091323d1805 + !! source digest: sha256:4bac77b10863d37a6d94d450ac1584accce5be4a436a7a839f8035d8cab1729d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/base_rest/__manifest__.py b/base_rest/__manifest__.py index 755c27fe4..ccded323b 100644 --- a/base_rest/__manifest__.py +++ b/base_rest/__manifest__.py @@ -6,7 +6,7 @@ "summary": """ Develop your own high level REST APIs for Odoo thanks to this addon. """, - "version": "18.0.1.1.1", + "version": "18.0.1.1.2", "development_status": "Beta", "license": "LGPL-3", "author": "ACSONE SA/NV, " "Odoo Community Association (OCA)", diff --git a/base_rest/static/description/index.html b/base_rest/static/description/index.html index 11068ef2a..d5fc38403 100644 --- a/base_rest/static/description/index.html +++ b/base_rest/static/description/index.html @@ -372,7 +372,7 @@

Base Rest

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:198b97806a0a8c480e6c8f26f3ce3199cba9978f8d152ecf93c80091323d1805 +!! source digest: sha256:4bac77b10863d37a6d94d450ac1584accce5be4a436a7a839f8035d8cab1729d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runboat

This addon is deprecated and not fully supported anymore from Odoo 16. From 423d8922f0eab8b879450a53143d7f10f0e361cc Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 26 Mar 2026 10:36:12 +0100 Subject: [PATCH 02/12] base_rest: turn off deprecation logging on demand Disable logging for deprecation. You might have big projects, with tons of services with no specific decorator, that are well tested and very stable and you don't want to touch them. Especially if you plan already to move to v16. Since this logging can bloat your CI and your log collecting tools, here is a way to prevent that and get only a msg at boot. Once enabled, you'll see this msg in the logs only at start up: 'odoo.addons.base_rest.components.service: REST_API_METHOD_FIX_DECORATOR_DEPRECATE_LOG_DISABLE enabled: implicit service methods are deprecated. Disable this env key and enable debug level to have more details.' --- base_rest/components/service.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/base_rest/components/service.py b/base_rest/components/service.py index b8611bcf2..af14b6d3a 100644 --- a/base_rest/components/service.py +++ b/base_rest/components/service.py @@ -3,6 +3,7 @@ import logging +import os from werkzeug.exceptions import NotFound @@ -17,6 +18,23 @@ _logger = logging.getLogger(__name__) +# Disable logging for deprecation. +# You might have big projects, with tons of services with no specific decorator, +# that are well tested and very stable and you don't want to touch them. +# Especially if you plan already to move to v16. +# Since this logging can bloat your CI and your log collecting tools, +# here is a way to prevent that and get only a msg at boot. +DISABLE_DEPRECATE_LOG_KEY = "REST_API_METHOD_FIX_DECORATOR_DEPRECATE_LOG_DISABLE" +DISABLE_DEPRECATE_LOG = os.getenv(DISABLE_DEPRECATE_LOG_KEY) +if DISABLE_DEPRECATE_LOG: + msg = ( + "%s enabled: " + "implicit service methods are deprecated. " + "Disable this env key and enable debug level to have more details." + ) + _logger.warning(msg, DISABLE_DEPRECATE_LOG_KEY) + + def to_int(val): # The javascript VM ducktape only use float and so pass float # to the api, the werkzeug request interpret params as unicode @@ -127,7 +145,7 @@ def _prepare_response(self, method, result): return result routing = getattr(method, ROUTING_DECORATOR_ATTR, None) output_param = routing["output_param"] - if not output_param: + if not output_param and not DISABLE_DEPRECATE_LOG: _logger.warning( "DEPRECATED: You must define an output schema for method %s " "in service %s", From 9a7c71224ed05380e7dba3f82c7ab21d0d043965 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Thu, 26 Mar 2026 11:12:30 +0100 Subject: [PATCH 03/12] fixup! base_rest: turn off deprecation logging on demand --- base_rest/components/service.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base_rest/components/service.py b/base_rest/components/service.py index af14b6d3a..57a78aea7 100644 --- a/base_rest/components/service.py +++ b/base_rest/components/service.py @@ -145,15 +145,16 @@ def _prepare_response(self, method, result): return result routing = getattr(method, ROUTING_DECORATOR_ATTR, None) output_param = routing["output_param"] - if not output_param and not DISABLE_DEPRECATE_LOG: + if output_param: + return output_param.to_response(self, result) + elif not output_param and not DISABLE_DEPRECATE_LOG: _logger.warning( "DEPRECATED: You must define an output schema for method %s " "in service %s", method_name, self._name, ) - return result - return output_param.to_response(self, result) + return result def dispatch(self, method_name, *args, params=None): """ From 128b3ea524f54f62c549504e8717bd24d951a78c Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Tue, 24 Mar 2026 13:02:36 +0100 Subject: [PATCH 04/12] [FIX] base_rest: Fix assets in manifest --- base_rest/README.rst | 6 +--- base_rest/__manifest__.py | 5 ++- base_rest/static/description/index.html | 42 +++++++++++-------------- 3 files changed, 21 insertions(+), 32 deletions(-) diff --git a/base_rest/README.rst b/base_rest/README.rst index 921157c84..2191d8146 100644 --- a/base_rest/README.rst +++ b/base_rest/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - ========= Base Rest ========= @@ -17,7 +13,7 @@ Base Rest .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png :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 diff --git a/base_rest/__manifest__.py b/base_rest/__manifest__.py index ccded323b..8a470d40c 100644 --- a/base_rest/__manifest__.py +++ b/base_rest/__manifest__.py @@ -9,7 +9,7 @@ "version": "18.0.1.1.2", "development_status": "Beta", "license": "LGPL-3", - "author": "ACSONE SA/NV, " "Odoo Community Association (OCA)", + "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "maintainers": [], "website": "https://github.com/OCA/rest-framework", "depends": ["component", "web"], @@ -20,8 +20,7 @@ "assets": { "web.assets_frontend": [ "base_rest/static/src/scss/base_rest.scss", - "base_rest/static/src/js/swagger_ui.js", - "base_rest/static/src/js/swagger.js", + "base_rest/static/src/js/components/swagger_ui.js", ], }, "external_dependencies": { diff --git a/base_rest/static/description/index.html b/base_rest/static/description/index.html index d5fc38403..50145ecf5 100644 --- a/base_rest/static/description/index.html +++ b/base_rest/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Base Rest -

+
+

Base Rest

- - -Odoo Community Association - -
-

Base Rest

-

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runboat

This addon is deprecated and not fully supported anymore from Odoo 16. Please migrate to the FastAPI migration module. See https://github.com/OCA/rest-framework/pull/291.

@@ -414,7 +409,7 @@

Base Rest

-

Configuration

+

Configuration

If an error occurs when calling a method of a service (ie missing parameter, ..) the system returns only a general description of the problem without details. This is done on purpose to ensure maximum @@ -436,7 +431,7 @@

Configuration

mode in production.

-

Usage

+

Usage

To add your own REST service you must provides at least 2 classes.

  • A Component providing the business logic of your service,
  • @@ -683,7 +678,7 @@

    Usage

    evaluation context.

-

Changelog

+

Changelog

-

16.0.1.0.2 (2023-10-07)

+

16.0.1.0.2 (2023-10-07)

Features

-

12.0.2.0.1

+

12.0.2.0.1

  • validator_…() methods can now return a cerberus Validator object instead of a schema dictionnary, for additional flexibility @@ -715,20 +710,20 @@

    12.0.2.0.1

-

12.0.2.0.0

+

12.0.2.0.0

  • Licence changed from AGPL-3 to LGPL-3
-

12.0.1.0.1

+

12.0.1.0.1

  • Fix issue when rendering the jsonapi documentation if no documentation is provided on a method part of the REST api.
-

12.0.1.0.0

+

12.0.1.0.0

First official version. The addon has been incubated into the Shopinvader repository from @@ -736,7 +731,7 @@

12.0.1.0.0

-

Bug Tracker

+

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 @@ -744,22 +739,22 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • ACSONE SA/NV
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -772,6 +767,5 @@

Maintainers

-
From 0ed75d8a0c573cea5a17944ba1cd16755848f476 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 27 Mar 2026 07:49:06 +0000 Subject: [PATCH 05/12] [BOT] post-merge updates --- base_rest/README.rst | 8 +++-- base_rest/static/description/index.html | 44 ++++++++++++++----------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/base_rest/README.rst b/base_rest/README.rst index 2191d8146..933c6f2eb 100644 --- a/base_rest/README.rst +++ b/base_rest/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ========= Base Rest ========= @@ -7,13 +11,13 @@ Base Rest !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:4bac77b10863d37a6d94d450ac1584accce5be4a436a7a839f8035d8cab1729d + !! source digest: sha256:25cd8c40026a737b1bedc8d9b51867a5be4866256a570f3363f939584faece0d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png :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 diff --git a/base_rest/static/description/index.html b/base_rest/static/description/index.html index 50145ecf5..7fae17bd4 100644 --- a/base_rest/static/description/index.html +++ b/base_rest/static/description/index.html @@ -3,7 +3,7 @@ -Base Rest +README.rst -
-

Base Rest

+
+ + +Odoo Community Association + +
+

Base Rest

-

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runboat

This addon is deprecated and not fully supported anymore from Odoo 16. Please migrate to the FastAPI migration module. See https://github.com/OCA/rest-framework/pull/291.

@@ -409,7 +414,7 @@

Base Rest

-

Configuration

+

Configuration

If an error occurs when calling a method of a service (ie missing parameter, ..) the system returns only a general description of the problem without details. This is done on purpose to ensure maximum @@ -431,7 +436,7 @@

Configuration

mode in production.

-

Usage

+

Usage

To add your own REST service you must provides at least 2 classes.

  • A Component providing the business logic of your service,
  • @@ -678,7 +683,7 @@

    Usage

    evaluation context.

-

Changelog

+

Changelog

-

16.0.1.0.2 (2023-10-07)

+

16.0.1.0.2 (2023-10-07)

Features

-

12.0.2.0.1

+

12.0.2.0.1

  • validator_…() methods can now return a cerberus Validator object instead of a schema dictionnary, for additional flexibility @@ -710,20 +715,20 @@

    12.0.2.0.1

-

12.0.2.0.0

+

12.0.2.0.0

  • Licence changed from AGPL-3 to LGPL-3
-

12.0.1.0.1

+

12.0.1.0.1

  • Fix issue when rendering the jsonapi documentation if no documentation is provided on a method part of the REST api.
-

12.0.1.0.0

+

12.0.1.0.0

First official version. The addon has been incubated into the Shopinvader repository from @@ -731,7 +736,7 @@

12.0.1.0.0

-

Bug Tracker

+

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 @@ -739,22 +744,22 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • ACSONE SA/NV
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -767,5 +772,6 @@

Maintainers

+
From 1c4e8d16c36f6efd4946efac1c3642d3d70af9dc Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 3 Jul 2026 06:57:48 +0000 Subject: [PATCH 06/12] [BOT] post-merge updates --- base_rest/README.rst | 2 +- base_rest/__manifest__.py | 2 +- base_rest/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base_rest/README.rst b/base_rest/README.rst index 933c6f2eb..48ed5cff1 100644 --- a/base_rest/README.rst +++ b/base_rest/README.rst @@ -11,7 +11,7 @@ Base Rest !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:25cd8c40026a737b1bedc8d9b51867a5be4866256a570f3363f939584faece0d + !! source digest: sha256:20a1617d0113a752375e06ac1f8a36cc1cd264e5907ef504e1ef0278a12fecc4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/base_rest/__manifest__.py b/base_rest/__manifest__.py index 8a470d40c..7a7e4ad08 100644 --- a/base_rest/__manifest__.py +++ b/base_rest/__manifest__.py @@ -6,7 +6,7 @@ "summary": """ Develop your own high level REST APIs for Odoo thanks to this addon. """, - "version": "18.0.1.1.2", + "version": "18.0.1.1.3", "development_status": "Beta", "license": "LGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", diff --git a/base_rest/static/description/index.html b/base_rest/static/description/index.html index 7fae17bd4..958654ede 100644 --- a/base_rest/static/description/index.html +++ b/base_rest/static/description/index.html @@ -372,7 +372,7 @@

Base Rest

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:25cd8c40026a737b1bedc8d9b51867a5be4866256a570f3363f939584faece0d +!! source digest: sha256:20a1617d0113a752375e06ac1f8a36cc1cd264e5907ef504e1ef0278a12fecc4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/rest-framework Translate me on Weblate Try me on Runboat

This addon is deprecated and not fully supported anymore from Odoo 16. From 86c540393de713b02b3802c9aae9943867401727 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 6 Oct 2026 09:59:54 +0000 Subject: [PATCH 07/12] [BOT] post-merge updates --- base_rest/README.rst | 3 ++- base_rest/__manifest__.py | 2 +- base_rest/static/description/index.html | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/base_rest/README.rst b/base_rest/README.rst index 48ed5cff1..0ac8580c4 100644 --- a/base_rest/README.rst +++ b/base_rest/README.rst @@ -11,7 +11,7 @@ Base Rest !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:20a1617d0113a752375e06ac1f8a36cc1cd264e5907ef504e1ef0278a12fecc4 + !! source digest: sha256:9e4588157b2a0c1f427679ba2a04ae87646f52c849579fafb07a52da6f7f577b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -421,6 +421,7 @@ Contributors - Laurent Mignon - Sébastien Beau +- Michael Tietz (MT Software) Maintainers ----------- diff --git a/base_rest/__manifest__.py b/base_rest/__manifest__.py index 7a7e4ad08..c11dc3109 100644 --- a/base_rest/__manifest__.py +++ b/base_rest/__manifest__.py @@ -6,7 +6,7 @@ "summary": """ Develop your own high level REST APIs for Odoo thanks to this addon. """, - "version": "18.0.1.1.3", + "version": "18.0.1.2.0", "development_status": "Beta", "license": "LGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", diff --git a/base_rest/static/description/index.html b/base_rest/static/description/index.html index 958654ede..eee119e45 100644 --- a/base_rest/static/description/index.html +++ b/base_rest/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Base Rest