From c55de594421a3a181a94524be0dead7d75055327 Mon Sep 17 00:00:00 2001 From: Telmo Santos Date: Mon, 23 Jan 2023 11:37:53 +0100 Subject: [PATCH] [IMP] Add environment variable use_microsoft_outlook_service on incoming server --- mail_environment_office365/README.rst | 15 ++++++------ mail_environment_office365/models/__init__.py | 1 + .../models/fetchmail_server.py | 23 +++++++++++++++++++ .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 9 ++++---- 5 files changed, 38 insertions(+), 11 deletions(-) create mode 100644 mail_environment_office365/models/fetchmail_server.py diff --git a/mail_environment_office365/README.rst b/mail_environment_office365/README.rst index 687f4da..99b2116 100644 --- a/mail_environment_office365/README.rst +++ b/mail_environment_office365/README.rst @@ -14,14 +14,14 @@ Server environment configuration for Office365 :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github - :target: https://github.com/OCA/server-env/tree/15.0/mail_environment_office365 + :target: https://github.com/OCA/server-env/tree/13.0/mail_environment_office365 :alt: OCA/server-env .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-env-15-0/server-env-15-0-mail_environment_office365 + :target: https://translation.odoo-community.org/projects/server-env-13-0/server-env-13-0-mail_environment_office365 :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/254/15.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/server-env&target_branch=13.0 + :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -60,7 +60,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. @@ -78,6 +78,7 @@ Contributors * `Camptocamp `_ * Anna Janiszewska + * Telmo Santos Maintainers ~~~~~~~~~~~ @@ -92,6 +93,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/server-env `_ project on GitHub. +This module is part of the `OCA/server-env `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_environment_office365/models/__init__.py b/mail_environment_office365/models/__init__.py index abbcb50..a21a540 100644 --- a/mail_environment_office365/models/__init__.py +++ b/mail_environment_office365/models/__init__.py @@ -1 +1,2 @@ from . import ir_mail_server +from . import fetchmail_server diff --git a/mail_environment_office365/models/fetchmail_server.py b/mail_environment_office365/models/fetchmail_server.py new file mode 100644 index 0000000..ddc2e51 --- /dev/null +++ b/mail_environment_office365/models/fetchmail_server.py @@ -0,0 +1,23 @@ +# Copyright 2023 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +import operator + +from odoo import api, fields, models +from odoo.osv.expression import FALSE_DOMAIN + + +class FetchmailServer(models.Model): + """Incoming POP/IMAP mail server account""" + + _name = "fetchmail.server" + _inherit = ["fetchmail.server", "server.env.mixin"] + + @property + def _server_env_fields(self): + base_fields = super()._server_env_fields + office365_fields = { + "use_microsoft_outlook_service": {}, + } + office365_fields.update(base_fields) + return office365_fields diff --git a/mail_environment_office365/readme/CONTRIBUTORS.rst b/mail_environment_office365/readme/CONTRIBUTORS.rst index d3a19de..be90963 100644 --- a/mail_environment_office365/readme/CONTRIBUTORS.rst +++ b/mail_environment_office365/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * `Camptocamp `_ * Anna Janiszewska + * Telmo Santos diff --git a/mail_environment_office365/static/description/index.html b/mail_environment_office365/static/description/index.html index 78c6744..ec0ce22 100644 --- a/mail_environment_office365/static/description/index.html +++ b/mail_environment_office365/static/description/index.html @@ -3,7 +3,7 @@ - + Server environment configuration for Office365