diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-10-08 10:49:01 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-10-08 10:49:01 +0300 |
commit | ba1315d8a611f1b891cfd6610fbd053077357cb7 (patch) | |
tree | 23988641efd2fefaf9af4cbe3b2f26a143bc6558 /servo/views | |
parent | 2a7251afa0438b1472c66932a4c22d378ae15c28 (diff) | |
download | Servo-ba1315d8a611f1b891cfd6610fbd053077357cb7.tar.gz Servo-ba1315d8a611f1b891cfd6610fbd053077357cb7.tar.bz2 Servo-ba1315d8a611f1b891cfd6610fbd053077357cb7.zip |
Add Dispatch & Close
Diffstat (limited to 'servo/views')
-rw-r--r-- | servo/views/invoices.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/servo/views/invoices.py b/servo/views/invoices.py index 2fb7b26..6b77c8b 100644 --- a/servo/views/invoices.py +++ b/servo/views/invoices.py @@ -159,6 +159,11 @@ def create_invoice(request, order_id=None, numbers=None): messages.success(request, _(u'Order %s dispatched') % order.code) except Exception as e: messages.error(request, e) + + if form.cleaned_data.get('close'): + order.close(request.user) + messages.success(request, _(u'Order %s closed') % order.code) + return redirect(order) else: messages.error(request, form.errors) |