The orginal PR and it's forward ports https://github.com/odoo/odoo/pull/121048
intorduced an unexpected AttributeError when using OAuth for incoming
mail servers (fetchmail.server). Since `smtp_user` is not a defined field
in fetchmail.server (it uses the field `user` instead), we had to change
the approach.
To prevent this error, we move the UserError call into the respective
ir_mail_server models, which should check the contrains at that level.
This means that before the form gets saved, trying to connect using an
OAuth account, should prompt the user to first specify an smtp_user before
proceeding.
X-original-commit: fcfd72a5e5663fa6b08c80a8a22ec15c8a09456f
Original author: niyasraphy <niyasraphyk@gmail.com>
Conflict resolution for saas-15.2, 16.0, saas-16.2, saas-16.3
closesodoo/odoo#123660
X-original-commit: b0749e430847d2f49e07b119915e8dee0c4e7f00
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>