Improved button layout for purchase order page

This commit is contained in:
Oliver Walters 2019-06-18 23:18:48 +10:00
parent 3dddb10f5d
commit fe4bc15c8e
2 changed files with 8 additions and 4 deletions

View File

@ -61,12 +61,12 @@ InvenTree | {{ order }}
<hr>
<div class='btn-group' style='float: right;'>
<div id='order-toolbar-buttons' class='btn-group' style='float: right;'>
<button type='button' class='btn btn-primary' id='edit-order'>Edit Order</button>
{% if order.status == OrderStatus.PENDING and order.lines.count > 0 %}
<button type='button' class='btn btn-primary' id='place-order'>Place Order</button>
{% elif order.status == OrderStatus.PLACED %}
<button type='button' class='btn btn-primary' id='receive-order'>Receive Order</button>
<button type='button' class='btn btn-primary' id='receive-order'>Receive Items</button>
{% endif %}
<button type='button' class='btn btn-primary' id='export-order' title='Export order to file'>Export</button>
</div>
@ -77,7 +77,7 @@ InvenTree | {{ order }}
<button type='button' class='btn btn-default' id='new-po-line'>Add Line Item</button>
{% endif %}
<table class='table table-striped table-condensed' id='po-lines-table'>
<table class='table table-striped table-condensed' id='po-lines-table' data-toolbar='#order-toolbar-buttons'>
<thead>
<tr>
<th data-sortable='true'>Line</th>

View File

@ -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)