Skip to content

Commit

Permalink
Deprecate microsoft_outlook_single_tenant
Browse files Browse the repository at this point in the history
Odoo added the possibility to customize microsoft authentication endpoint. Therefore this module is not needed anymore.
  • Loading branch information
santostelmo committed Feb 2, 2023
1 parent 2927fd8 commit ed30d22
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions microsoft_outlook_single_tenant/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import models
from . import hooks
2 changes: 1 addition & 1 deletion microsoft_outlook_single_tenant/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
{
"name": "Microsoft Outlook Single Tenant",
"name": "Microsoft Outlook Single Tenant (DEPRECATED)",
"version": "14.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand Down
19 changes: 19 additions & 0 deletions microsoft_outlook_single_tenant/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

import logging

_logger = logging.getLogger(__name__)


def deprecate():
_logger.warning(
"""
`microsoft_outlook_single_tenant` is deprecated.
Configure microsoft_outlook.endpoint ir.config_parameter
"""
)


def post_load_hook():
deprecate()
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ def test_default_app_endpoint(self):
self.assertIn(common_endpoint, mail_server.microsoft_outlook_uri)

def test_single_tenant_app_endpoint(self):
self.env["ir.config_parameter"].sudo().set_param(
"microsoft_outlook.endpoint",
"https://login.microsoftonline.com/test_directory_tenant_id/oauth2/v2.0/",
)
self.env["res.config.settings"].create(
{
"microsoft_outlook_client_identifier": "test_client_id",
Expand Down

0 comments on commit ed30d22

Please sign in to comment.