-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
If somebody wants to send emails when an invoice is issued for example, and wants to attach the PDF file to the invoice, it will have to render it on the spot (since it is rendered async and it's not ready when the invoice transitioned signal is triggered). That might take a long time (because of xhtml2pdf), and if it happens during a web request, it might throw a timeout error, resulting in the transaction not updating it's status etc.
A solution would be to create a signal called invoice_ready (state=[issued, paid...]), and send it when the PDF is done rendering after an invoice transition. Similar for proformas. This signal should state that the document is ready to be shown to the customer.