mirror of
https://github.com/NaN-tic/trytond-babi.git
synced 2023-12-14 02:53:06 +01:00
parent
f9234a984b
commit
0c030730a8
1 changed files with 2 additions and 2 deletions
4
babi.py
4
babi.py
|
@ -1105,11 +1105,11 @@ class Report(DeactivableMixin, ModelSQL, ModelView):
|
|||
}
|
||||
report = HTMLReport.execute(records, data)
|
||||
|
||||
if report:
|
||||
if report and report[1]:
|
||||
msg = MIMEMultipart()
|
||||
msg['To'] = execution.report.to
|
||||
msg['From'] = execution.report.smtp.smtp_email
|
||||
msg['Subject'] = Header(execution.report.subject, 'utf-8')
|
||||
msg['Subject'] = Header(execution.report.subject, 'utf-8').encode()
|
||||
msg.attach(MIMEText('Business Intelligence', 'plain'))
|
||||
|
||||
part = MIMEBase('application', 'octet-stream')
|
||||
|
|
Loading…
Reference in a new issue