Allow to disable some e-mails depending on sales channel (#1726)

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Raphael Michel
2020-07-28 09:26:18 +02:00
committed by GitHub
12 changed files with 137 additions and 11 deletions

View File

@@ -1491,7 +1491,7 @@ class OrderPayment(models.Model):
trigger_pdf=not send_mail or not self.order.event.settings.invoice_email_attachment
)
if send_mail:
if send_mail and self.order.sales_channel in self.order.event.settings.mail_sales_channel_placed_paid:
self._send_paid_mail(invoice, user, mail_text)
if self.order.event.settings.mail_send_order_paid_attendee:
for p in self.order.positions.all():