OCA / server-env

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

[FIX] Allow manual configuration of incoming mail server #172

Closed rven closed 3 months ago

rven commented 9 months ago

When manual configuring an incoming mail server, the changes are not saved.

The problem is because the fields are marked as readonly by the server environment module.

With this change it is allowed to manually add an incoming mail server.

len-foss commented 8 months ago

What is the problem to be solved?

Improper configuration of email server in an environment is fairly risky, and so it is a feature that it would be impossible to change manually. Making this patch the default would mean losing the safety this brings. And changing something like that without big warnings would create problems for sure.

If the argument is that it is not a big problem if backup/restoration scripts make sure that there are no such risks, then why would this feature be needed?

My understanding would be that this change should be in another optional module if you really want it, but the default behaviour shouldn't change.

rven commented 8 months ago

With this change it is possible to create manual entries in the mail configuration.

The mail servers defined in the configuration are still not updateable!

It's a bit strange to that you suggest to create an extra module to enable standard Odoo functionality again?

Outgoing mail servers can be entered manually!

BTW if you neutralize the DB it is done automatically by Odoo parts/odoo/addons/mail/data/neutralize.sql

len-foss commented 8 months ago

In that case, why bother with mail_environment at all? You can just uninstall the module and put mail environment changes into your backup/restore scripts, and then you can change everything manually.

rven commented 8 months ago

We use them in combination. The "test" environments are defined in the configuration to enable mailtrap by default. But the customer should be able to change / add incoming mail servers manually in the production environment. I don't see the problem why this change is breaking stuff! It just fixes a "bug" in this module.

len-foss commented 8 months ago

In that case it seems the need is covered by server_environment_data_encryption as is discussed in more details in issue 169.

rven commented 8 months ago

Does this also allow to manually create an incoming mail server? Because the values are not accepted at all, because the fields are readonly...

github-actions[bot] commented 4 months 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.