From 9852cf79bab72ef9a76e576f12f81ee95782bb11 Mon Sep 17 00:00:00 2001
From: Maksym Yankin
Date: Wed, 1 Dec 2021 12:51:14 +0200
Subject: [PATCH] [MIG] base_rest_datamodel: Migration to 15.0
---
.pre-commit-config.yaml | 1 -
base_rest_datamodel/README.rst | 10 +++++-----
base_rest_datamodel/__manifest__.py | 6 +++---
base_rest_datamodel/i18n/base_rest_datamodel.pot | 2 +-
base_rest_datamodel/restapi.py | 2 +-
base_rest_datamodel/static/description/index.html | 6 +++---
.../odoo/addons/base_rest_datamodel | 1 +
setup/base_rest_datamodel/setup.py | 6 ++++++
8 files changed, 20 insertions(+), 14 deletions(-)
create mode 120000 setup/base_rest_datamodel/odoo/addons/base_rest_datamodel
create mode 100644 setup/base_rest_datamodel/setup.py
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 54a87467b..9d8c3d980 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -4,7 +4,6 @@ exclude: |
^base_rest_auth_api_key/|
^base_rest_auth_jwt/|
^base_rest_auth_user_service/|
- ^base_rest_datamodel/|
^base_rest_demo/|
^graphql_base/|
^graphql_demo/|
diff --git a/base_rest_datamodel/README.rst b/base_rest_datamodel/README.rst
index 95b2cf60a..f0802fbe5 100644
--- a/base_rest_datamodel/README.rst
+++ b/base_rest_datamodel/README.rst
@@ -14,13 +14,13 @@ Base Rest Datamodel
: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/14.0/base_rest_datamodel
+ :target: https://github.com/OCA/rest-framework/tree/15.0/base_rest_datamodel
: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-14-0/rest-framework-14-0-base_rest_datamodel
+ :target: https://translation.odoo-community.org/projects/rest-framework-15-0/rest-framework-15-0-base_rest_datamodel
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/271/14.0
+ :target: https://runbot.odoo-community.org/runbot/271/15.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -80,7 +80,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 smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -110,6 +110,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-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/base_rest_datamodel/__manifest__.py b/base_rest_datamodel/__manifest__.py
index daf2e3430..ff44a91d5 100644
--- a/base_rest_datamodel/__manifest__.py
+++ b/base_rest_datamodel/__manifest__.py
@@ -5,13 +5,13 @@
"name": "Base Rest Datamodel",
"summary": """
Datamodel binding for base_rest""",
- "version": "14.0.4.1.0",
+ "version": "15.0.1.0.0",
"license": "LGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/rest-framework",
"depends": ["base_rest", "datamodel"],
"data": [],
"demo": [],
- "external_dependencies": {"python": ["apispec", "marshmallow"]},
- "installable": False,
+ "external_dependencies": {"python": ["apispec>=4.0.0", "marshmallow"]},
+ "installable": True,
}
diff --git a/base_rest_datamodel/i18n/base_rest_datamodel.pot b/base_rest_datamodel/i18n/base_rest_datamodel.pot
index 7dc461d5e..3de8c1239 100644
--- a/base_rest_datamodel/i18n/base_rest_datamodel.pot
+++ b/base_rest_datamodel/i18n/base_rest_datamodel.pot
@@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 14.0\n"
+"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/base_rest_datamodel/restapi.py b/base_rest_datamodel/restapi.py
index dc764c872..c334ec1e3 100644
--- a/base_rest_datamodel/restapi.py
+++ b/base_rest_datamodel/restapi.py
@@ -37,7 +37,7 @@ def from_params(self, service, params):
partial=self._partial,
)
except ValidationError as ve:
- raise UserError(_("BadRequest %s") % ve.messages)
+ raise UserError(_("BadRequest %s") % ve.messages) from ve
def to_response(self, service, result):
ModelClass = service.env.datamodels[self._name]
diff --git a/base_rest_datamodel/static/description/index.html b/base_rest_datamodel/static/description/index.html
index 58c2f035d..8bc7f3501 100644
--- a/base_rest_datamodel/static/description/index.html
+++ b/base_rest_datamodel/static/description/index.html
@@ -367,7 +367,7 @@ Base Rest Datamodel
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This addon allows you to use DataModel objects as params and/or response with your
REST API methods.
Table of contents
@@ -427,7 +427,7 @@
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 smashing it by providing a detailed and welcomed
-feedback.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -451,7 +451,7 @@
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-
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/setup/base_rest_datamodel/odoo/addons/base_rest_datamodel b/setup/base_rest_datamodel/odoo/addons/base_rest_datamodel
new file mode 120000
index 000000000..a809cfdf5
--- /dev/null
+++ b/setup/base_rest_datamodel/odoo/addons/base_rest_datamodel
@@ -0,0 +1 @@
+../../../../base_rest_datamodel
\ No newline at end of file
diff --git a/setup/base_rest_datamodel/setup.py b/setup/base_rest_datamodel/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/base_rest_datamodel/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)