[FIX] google_gmail, microsoft_outlook : move UserError to ir_mail_server
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. closes odoo/odoo#122222 Signed-off-by:Stéphane Debauche (std) <std@odoo.com>
Showing
- addons/google_gmail/i18n/google_gmail.pot 1 addition, 1 deletionaddons/google_gmail/i18n/google_gmail.pot
- addons/google_gmail/models/google_gmail_mixin.py 0 additions, 5 deletionsaddons/google_gmail/models/google_gmail_mixin.py
- addons/google_gmail/models/ir_mail_server.py 9 additions, 1 deletionaddons/google_gmail/models/ir_mail_server.py
- addons/microsoft_outlook/i18n/microsoft_outlook.pot 1 addition, 1 deletionaddons/microsoft_outlook/i18n/microsoft_outlook.pot
- addons/microsoft_outlook/models/ir_mail_server.py 5 additions, 0 deletionsaddons/microsoft_outlook/models/ir_mail_server.py
- addons/microsoft_outlook/models/microsoft_outlook_mixin.py 0 additions, 5 deletionsaddons/microsoft_outlook/models/microsoft_outlook_mixin.py
Loading