Commit 125eb817 by mrey

ShoppingCart: Added number receipt to PDF name file

parent 84e88eba
...@@ -409,7 +409,7 @@ class Order(models.Model): ...@@ -409,7 +409,7 @@ class Order(models.Model):
if csv_file: if csv_file:
email.attach(u'RegistrationCodesRedemptionUrls.csv', csv_file.getvalue(), 'text/csv') email.attach(u'RegistrationCodesRedemptionUrls.csv', csv_file.getvalue(), 'text/csv')
if pdf_file is not None: if pdf_file is not None:
email.attach(u'Receipt.pdf', pdf_file.getvalue(), 'application/pdf') email.attach(u'Receipt{}.pdf'.format(str(self.id)), pdf_file.getvalue(), 'application/pdf')
else: else:
file_buffer = StringIO.StringIO(_('pdf download unavailable right now, please contact support.')) file_buffer = StringIO.StringIO(_('pdf download unavailable right now, please contact support.'))
email.attach(u'pdf_not_available.txt', file_buffer.getvalue(), 'text/plain') email.attach(u'pdf_not_available.txt', file_buffer.getvalue(), 'text/plain')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment