From f108bc15e927e660d4235b01727f0f81cf287d0d Mon Sep 17 00:00:00 2001 From: chien Date: Mon, 29 Jan 2024 09:18:47 +0700 Subject: [PATCH] [MIG] auth_api_key_server_env: Migration to 17.0 --- auth_api_key_server_env/__manifest__.py | 2 +- .../migrations/16.0.1.0.0/post-migration.py | 10 ---------- auth_api_key_server_env/static/description/index.html | 1 - auth_api_key_server_env/tests/test_auth_api_key.py | 2 +- 4 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 auth_api_key_server_env/migrations/16.0.1.0.0/post-migration.py diff --git a/auth_api_key_server_env/__manifest__.py b/auth_api_key_server_env/__manifest__.py index 9a178dc898..08dccc8b2b 100644 --- a/auth_api_key_server_env/__manifest__.py +++ b/auth_api_key_server_env/__manifest__.py @@ -11,7 +11,7 @@ environments when restoring databases. All you have to do is to add a new section to your configuration file according to the following convention: """, - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "development_status": "Alpha", "license": "LGPL-3", "website": "https://github.com/OCA/server-auth", diff --git a/auth_api_key_server_env/migrations/16.0.1.0.0/post-migration.py b/auth_api_key_server_env/migrations/16.0.1.0.0/post-migration.py deleted file mode 100644 index e590eae6fa..0000000000 --- a/auth_api_key_server_env/migrations/16.0.1.0.0/post-migration.py +++ /dev/null @@ -1,10 +0,0 @@ -from odoo import SUPERUSER_ID, api - - -def migrate(cr, version): - env = api.Environment(cr, SUPERUSER_ID, {}) - keys = env["auth.api.key"].search( - [("tech_name", "=", False), ("name", "!=", False)] - ) - for key in keys: - key.write({"tech_name": key._normalize_tech_name(key.name)}) diff --git a/auth_api_key_server_env/static/description/index.html b/auth_api_key_server_env/static/description/index.html index 99f50c64f7..503790231c 100644 --- a/auth_api_key_server_env/static/description/index.html +++ b/auth_api_key_server_env/static/description/index.html @@ -1,4 +1,3 @@ - diff --git a/auth_api_key_server_env/tests/test_auth_api_key.py b/auth_api_key_server_env/tests/test_auth_api_key.py index cded35ecd8..1444349a79 100644 --- a/auth_api_key_server_env/tests/test_auth_api_key.py +++ b/auth_api_key_server_env/tests/test_auth_api_key.py @@ -22,7 +22,7 @@ def setUpClass(cls, *args, **kwargs): "tech_name": "test_env", } ) - cls.api_key_from_env.refresh() + cls.api_key_from_env.invalidate_recordset() serv_config.add_section("api_key_test_env") serv_config.set("api_key_test_env", "key", "api_key_from_env")