File tree 1 file changed +5
-8
lines changed
l10n_it_fatturapa_pec/models
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,11 @@ class IrMailServer(models.Model):
11
11
is_fatturapa_pec = fields .Boolean ("E-invoice PEC server" )
12
12
email_from_for_fatturaPA = fields .Char ("Sender Email Address" )
13
13
14
- def test_smtp_connection (self ):
15
- for server in self :
16
- if server .is_fatturapa_pec :
17
- # self.env.user.email is used to test SMTP connection
18
- server .env .user .email = server .email_from_for_fatturaPA
19
- # no need to revert to correct email: UserError is always raised and
20
- # rollback done
21
- return super ().test_smtp_connection ()
14
+ def _get_test_email_addresses (self ):
15
+ email_from , email_to = super ()._get_test_email_addresses ()
16
+ if self .is_fatturapa_pec :
17
+ email_from = self .email_from_for_fatturaPA
18
+ return email_from , email_to
22
19
23
20
@api .model
24
21
def _search (
You can’t perform that action at this time.
0 commit comments