mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Render part information in stock item tracking table (if provided)
This commit is contained in:
@ -1234,6 +1234,15 @@ class StockTrackingList(generics.ListAPIView):
|
||||
if not deltas:
|
||||
deltas = {}
|
||||
|
||||
# Add part detail
|
||||
if 'part' in deltas:
|
||||
try:
|
||||
part = Part.objects.get(pk=deltas['part'])
|
||||
serializer = PartBriefSerializer(part)
|
||||
deltas['part_detail'] = serializer.data
|
||||
except:
|
||||
pass
|
||||
|
||||
# Add location detail
|
||||
if 'location' in deltas:
|
||||
try:
|
||||
|
@ -26,11 +26,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
<div id='table-toolbar'>
|
||||
<div id='tracking-table-toolbar'>
|
||||
<div class='btn-group'>
|
||||
{% include "filter_list.html" with id="stocktracking" %}
|
||||
</div>
|
||||
</div>
|
||||
<table class='table table-condensed table-striped' id='track-table' data-toolbar='#table-toolbar'>
|
||||
<table class='table table-condensed table-striped' id='track-table' data-toolbar='#tracking-table-toolbar'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -342,7 +343,6 @@
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
loadStockTrackingTable($("#track-table"), {
|
||||
params: {
|
||||
ordering: '-date',
|
||||
|
Reference in New Issue
Block a user