Creating an invoice sometimes causes an internal server error
The "cotisations/factures.tex"
path seems to be hardcoded in cotisations/utils.py
.
Example error log:
Traceback:
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "/var/www/re2o/re2o/acl.py" in wrapper
201. return view(request, *chain(instances, args), **kwargs)
File "/var/www/re2o/re2o/acl.py" in wrapper
201. return view(request, *chain(instances, args), **kwargs)
File "/var/www/re2o/cotisations/views.py" in new_facture
154. new_invoice_instance, request
File "/var/www/re2o/cotisations/models.py" in end_payment
873. invoice.save()
File "/var/www/re2o/cotisations/models.py" in save
335. send_mail_invoice(self)
File "/var/www/re2o/cotisations/utils.py" in send_mail_invoice
76. pdf = create_pdf("cotisations/factures.tex", ctx)
File "/var/www/re2o/cotisations/tex.py" in create_pdf
107. template = get_template(template)
File "/usr/lib/python3/dist-packages/django/template/loader.py" in get_template
25. raise TemplateDoesNotExist(template_name, chain=chain)
Exception Type: TemplateDoesNotExist at /cotisations/new_facture/1105
Exception Value: cotisations/factures.tex