mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Almost there, needs some interface testing and tweaking
This commit is contained in:
@ -773,7 +773,7 @@ class StockList(generics.ListCreateAPIView):
|
||||
company = params.get('company', None)
|
||||
|
||||
if company is not None:
|
||||
queryset = queryset.filter(Q(supplier_part__supplier=company) | Q(supplier_part__manufacturer=company))
|
||||
queryset = queryset.filter(Q(supplier_part__supplier=company) | Q(supplier_part__manufacturer_part__manufacturer=company))
|
||||
|
||||
# Filter by supplier
|
||||
supplier = params.get('supplier', None)
|
||||
@ -785,7 +785,7 @@ class StockList(generics.ListCreateAPIView):
|
||||
manufacturer = params.get('manufacturer', None)
|
||||
|
||||
if manufacturer is not None:
|
||||
queryset = queryset.filter(supplier_part__manufacturer=manufacturer)
|
||||
queryset = queryset.filter(supplier_part__manufacturer_part__manufacturer=manufacturer)
|
||||
|
||||
"""
|
||||
Filter by the 'last updated' date of the stock item(s):
|
||||
|
@ -84,7 +84,7 @@ class StockItemSerializer(InvenTreeModelSerializer):
|
||||
'sales_order',
|
||||
'supplier_part',
|
||||
'supplier_part__supplier',
|
||||
'supplier_part__manufacturer',
|
||||
'supplier_part__manufacturer_part__manufacturer',
|
||||
'allocations',
|
||||
'sales_order_allocations',
|
||||
'location',
|
||||
|
Reference in New Issue
Block a user