changeset 67b18a36a914 in modules/account_payment_stripe:default
details:
https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset;node=67b18a36a914
description:
Allow distinct FROM addresses for envelope and header
issue9948
review324741004
diffstat:
payment.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r 9a412a372f78 -r 67b18a36a914 payment.py
--- a/payment.py Sat Dec 26 23:55:17 2020 +0100
+++ b/payment.py Wed Feb 03 23:26:07 2021 +0100
@@ -489,8 +489,7 @@
def _send_email_checkout(self, from_=None):
pool = Pool()
Language = pool.get('ir.lang')
- if from_ is None:
- from_ = config.get('email', 'from')
+ from_cfg = config.get('email', 'from')
self.stripe_checkout([self])
emails = self._emails_checkout()
if not emails:
@@ -499,10 +498,10 @@
languages = [self.party.lang or Language.get()]
msg, title = get_email(
'account.payment.stripe.email_checkout', self, languages)
- msg['From'] = from_
+ msg['From'] = from_ or from_cfg
msg['To'] = ','.join(emails)
msg['Subject'] = Header(title, 'utf-8')
- sendmail_transactional(from_, emails, msg)
+ sendmail_transactional(from_cfg, emails, msg)
def _emails_checkout(self):
emails = []