Deprecate microsoft_outlook_single_tenant

Odoo added the possibility to customize microsoft authentication endpoint. Therefore this module is not needed anymore.
pull/1063/head
Telmo Santos 2023-02-02 14:10:27 +01:00
parent 9365649953
commit c4fbc05983
4 changed files with 25 additions and 1 deletions

View File

@ -1 +1,2 @@
from . import models from . import models
from . import hooks

View File

@ -1,7 +1,7 @@
# Copyright 2022 Camptocamp SA # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # 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": "15.0.1.0.0", "version": "15.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)", "author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",

View File

@ -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()

View File

@ -30,6 +30,10 @@ class TestFetchMailServerMicrosoftOutlook(TransactionCase):
self.assertIn(common_endpoint, mail_server.microsoft_outlook_uri) self.assertIn(common_endpoint, mail_server.microsoft_outlook_uri)
def test_single_tenant_app_endpoint(self): 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( self.env["res.config.settings"].create(
{ {
"microsoft_outlook_client_identifier": "test_client_id", "microsoft_outlook_client_identifier": "test_client_id",