Skip to content

Commit

Permalink
auth_api_key: 14.0.2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
simahawk committed Sep 27, 2021
1 parent 7aa9cfa commit 19cde64
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
3 changes: 1 addition & 2 deletions auth_api_key/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
"name": "Auth Api Key",
"summary": """
Authenticate http requests from an API key""",
"version": "14.0.1.0.1",
"version": "14.0.2.0.0",
"license": "LGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-auth",
"development_status": "Beta",
"data": ["security/ir.model.access.csv", "views/auth_api_key.xml"],
"demo": [],
}
27 changes: 27 additions & 0 deletions auth_api_key/migrations/14.0.2.0.0/post-migrate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2021 Camptocamp SA
# @author: Simone Orsi <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).


import logging

from odoo import SUPERUSER_ID, api

_logger = logging.getLogger(__name__)


def migrate(cr, version):
if not version:
return

env = api.Environment(cr, SUPERUSER_ID, {})
module = env["ir.module.module"].search(
[("name", "=", "auth_api_key_server_env"), ("state", "=", "uninstalled")]
)
if module:
module.write({"state": "to install"})
_logger.info(
"Install module auth_api_key_server_env to not break existing installations. "
"If you don't want this module to be installed, uninstall it manually."
)
return

0 comments on commit 19cde64

Please sign in to comment.