From fe4bc15c8e6b4763d096f9157c2b0a13dfc419bf Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 18 Jun 2019 23:18:48 +1000 Subject: [PATCH] Improved button layout for purchase order page --- InvenTree/order/templates/order/purchase_order_detail.html | 6 +++--- InvenTree/order/views.py | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 68370c9c22..a0b780408c 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -61,12 +61,12 @@ InvenTree | {{ order }}
-
+
{% if order.status == OrderStatus.PENDING and order.lines.count > 0 %} {% elif order.status == OrderStatus.PLACED %} - + {% endif %}
@@ -77,7 +77,7 @@ InvenTree | {{ order }} {% endif %} - +
diff --git a/InvenTree/order/views.py b/InvenTree/order/views.py index b5b9540fed..ae27a0bcc4 100644 --- a/InvenTree/order/views.py +++ b/InvenTree/order/views.py @@ -158,7 +158,11 @@ class PurchaseOrderExport(AjaxView): export_format = request.GET.get('format', 'csv') - filename = str(order) + '.' + export_format + filename = '{order} - {company}.{fmt}'.format( + order=str(order), + company=order.supplier.name, + fmt=export_format + ) filedata = order.export_to_file(format=export_format)
Line