mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 10:05:39 +00:00
Merge remote-tracking branch 'inventree/master' into drf-api-forms
This commit is contained in:
@ -28,7 +28,7 @@ def currency_code_mappings():
|
||||
"""
|
||||
Returns the current currency choices
|
||||
"""
|
||||
return [(a, a) for a in settings.CURRENCIES]
|
||||
return [(a, CURRENCIES[a].name) for a in settings.CURRENCIES]
|
||||
|
||||
|
||||
def currency_codes():
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -41,6 +41,7 @@
|
||||
part: {{ part.id }},
|
||||
location_detail: true,
|
||||
part_detail: false,
|
||||
supplier_part_detail: true,
|
||||
},
|
||||
groupByField: 'location',
|
||||
buttons: [
|
||||
|
@ -857,6 +857,17 @@ class StockList(generics.ListCreateAPIView):
|
||||
print("After error:", str(updated_after))
|
||||
pass
|
||||
|
||||
# Filter stock items which have a purchase price set
|
||||
has_purchase_price = params.get('has_purchase_price', None)
|
||||
|
||||
if has_purchase_price is not None:
|
||||
has_purchase_price = str2bool(has_purchase_price)
|
||||
|
||||
if has_purchase_price:
|
||||
queryset = queryset.exclude(purchase_price=None)
|
||||
else:
|
||||
queryset = queryset.filter(purchase_price=None)
|
||||
|
||||
# Optionally, limit the maximum number of returned results
|
||||
max_results = params.get('max_results', None)
|
||||
|
||||
|
@ -685,6 +685,20 @@ function loadStockTable(table, options) {
|
||||
return renderLink(text, link);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'supplier_part',
|
||||
title: '{% trans "Supplier Part" %}',
|
||||
formatter: function(value, row) {
|
||||
if (!value) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
var link = `/supplier-part/${row.supplier_part}/stock/`;
|
||||
var text = `${row.supplier_part_detail.SKU}`;
|
||||
|
||||
return renderLink(text, link);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'purchase_price',
|
||||
title: '{% trans "Purchase Price" %}',
|
||||
|
@ -205,7 +205,12 @@ function getAvailableTableFilters(tableKey) {
|
||||
batch: {
|
||||
title: '{% trans "Batch" %}',
|
||||
description: '{% trans "Batch code" %}',
|
||||
}
|
||||
},
|
||||
has_purchase_price: {
|
||||
type: 'bool',
|
||||
title: '{% trans "Has purchase price" %}',
|
||||
description: '{% trans "Show stock items which have a purchase price set" %}',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
<td>{% trans "Email Settings" %}</td>
|
||||
<td>
|
||||
<a href='https://inventree.readthedocs.io/en/latest/admin/email'>
|
||||
<span class='label label-red'>{% trans "Email settings not configured" %}</span>
|
||||
<span class='label label-yellow'>{% trans "Email settings not configured" %}</span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user