mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Include part stock information
This commit is contained in:
parent
ab0da6aaae
commit
8904733ac0
@ -1191,7 +1191,12 @@ class PartExport(AjaxView):
|
|||||||
'Trackable',
|
'Trackable',
|
||||||
'Salable',
|
'Salable',
|
||||||
'Active',
|
'Active',
|
||||||
'Virtual'
|
'Virtual',
|
||||||
|
'Stock Info', # Spacer between part data and stock data
|
||||||
|
'In Stock',
|
||||||
|
'Allocated',
|
||||||
|
'Building',
|
||||||
|
'On Order',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Construct list of suppliers for each part
|
# Construct list of suppliers for each part
|
||||||
@ -1207,7 +1212,7 @@ class PartExport(AjaxView):
|
|||||||
part.suppliers[name] = sp
|
part.suppliers[name] = sp
|
||||||
|
|
||||||
if len(supplier_names) > 0:
|
if len(supplier_names) > 0:
|
||||||
headers.append('')
|
headers.append('Suppliers')
|
||||||
for name in supplier_names:
|
for name in supplier_names:
|
||||||
headers.append(name)
|
headers.append(name)
|
||||||
|
|
||||||
@ -1216,7 +1221,7 @@ class PartExport(AjaxView):
|
|||||||
for part in parts:
|
for part in parts:
|
||||||
line = []
|
line = []
|
||||||
|
|
||||||
line.append(part.ID)
|
line.append(part.pk)
|
||||||
line.append(part.name)
|
line.append(part.name)
|
||||||
line.append(part.description)
|
line.append(part.description)
|
||||||
line.append(str(part.category))
|
line.append(str(part.category))
|
||||||
@ -1228,12 +1233,19 @@ class PartExport(AjaxView):
|
|||||||
line.append(part.notes)
|
line.append(part.notes)
|
||||||
line.append(part.assembly)
|
line.append(part.assembly)
|
||||||
line.append(part.component)
|
line.append(part.component)
|
||||||
line.append(part.template)
|
line.append(part.is_template)
|
||||||
line.append(part.trackable)
|
line.append(part.trackable)
|
||||||
line.append(part.salable)
|
line.append(part.salable)
|
||||||
line.append(part.active)
|
line.append(part.active)
|
||||||
line.append(part.virtual)
|
line.append(part.virtual)
|
||||||
|
|
||||||
|
# Stock information
|
||||||
|
line.append('')
|
||||||
|
line.append(part.total_stock)
|
||||||
|
line.append(part.allocation_count)
|
||||||
|
line.append(part.quantity_being_built)
|
||||||
|
line.append(part.on_order)
|
||||||
|
|
||||||
if len(supplier_names) > 0:
|
if len(supplier_names) > 0:
|
||||||
line.append('')
|
line.append('')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user