mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #2873 from SchrodingersGat/build-auto-allocate-fix
Fix for 'auto-allocate' stock to build orders
This commit is contained in:
commit
c743ededf4
@ -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