mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix for 'auto-allocate' stock to build orders
- Allocation of serialized stock items would cause issue - Exclude serialized stock from auto allocation process
This commit is contained in:
parent
2696f6bfbd
commit
85fd247878
@ -871,6 +871,9 @@ class Build(MPTTModel, ReferenceIndexingMixin):
|
||||
part__in=[p for p in available_parts],
|
||||
)
|
||||
|
||||
# Filter out "serialized" stock items, these cannot be auto-allocated
|
||||
available_stock = available_stock.filter(Q(serial=None) | Q(serial=''))
|
||||
|
||||
if location:
|
||||
# Filter only stock items located "below" the specified location
|
||||
sublocations = location.get_descendants(include_self=True)
|
||||
|
Loading…
Reference in New Issue
Block a user