OCA / server-env

Tools to manage environment-dependent configuration
GNU Affero General Public License v3.0
57 stars 157 forks source link

[14.0][ADD] mail_environment_office365 #119

Closed ajaniszewska-dev closed 1 year ago

ajaniszewska-dev commented 2 years ago

Backport of https://github.com/OCA/server-env/pull/117

simahawk commented 2 years ago

See comment on https://github.com/OCA/server-env/pull/117

rven commented 2 years ago

Why not adding this one also?

mail_environment_office365/models/fetchmail_server.py

from odoo import models

class FetchmailServer(models.Model):
    _inherit = "fetchmail.server"

    @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
OCA-git-bot commented 1 year ago

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

JordiBForgeFlow commented 1 year ago

I found a problem when using mail_environment in combination fetchmail_outlook, which is, as I understand, the ultimate goal of this module.

The constraint https://github.com/odoo/odoo/blob/14.0/addons/fetchmail_outlook/models/fetchmail_server.py#L32 fails, because it is unable to detect the correct value of the environment variable fields from the environment. So, it may fail due to the server_type, or is_ssl, if those are defined in the server environment. It seems to me that at the time when the constraint is called the values have not been fetched from the environment variables.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

sebalix commented 1 year ago

/ocabot merge nobump

OCA-git-bot commented 1 year ago

Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 14.0-ocabot-merge-pr-119-by-sebalix-bump-nobump, awaiting test results.

OCA-git-bot commented 1 year ago

Congratulations, your PR was merged at 5201090692d5ea3f1ef416dc1656d98979f3c752. Thanks a lot for contributing to OCA. ❤️