mirror of
https://github.com/inventree/InvenTree.git
synced 2025-12-19 13:20:37 -06:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c4362c42a | ||
|
|
5b6d999091 | ||
|
|
970714a76f | ||
|
|
59214cacbf |
@@ -13,7 +13,7 @@ import common.models
|
||||
from InvenTree.api_version import INVENTREE_API_VERSION
|
||||
|
||||
# InvenTree software version
|
||||
INVENTREE_SW_VERSION = "0.11.2"
|
||||
INVENTREE_SW_VERSION = "0.11.3"
|
||||
|
||||
|
||||
def inventreeInstanceName():
|
||||
|
||||
@@ -1293,6 +1293,11 @@ class Part(InvenTreeBarcodeMixin, MetadataMixin, MPTTModel):
|
||||
)
|
||||
|
||||
for item in queryset.all():
|
||||
|
||||
if item.quantity <= 0:
|
||||
# Ignore zero-quantity items
|
||||
continue
|
||||
|
||||
# Iterate through each item in the queryset, work out the limiting quantity
|
||||
quantity = item.available_stock + item.substitute_stock
|
||||
|
||||
|
||||
@@ -434,7 +434,8 @@ class StockFilter(rest_filters.FilterSet):
|
||||
"""
|
||||
if str2bool(value):
|
||||
# The 'quantity' field is greater than the calculated 'allocated' field
|
||||
return queryset.filter(Q(quantity__gt=F('allocated')))
|
||||
# Note that the item must also be "in stock"
|
||||
return queryset.filter(StockItem.IN_STOCK_FILTER).filter(Q(quantity__gt=F('allocated')))
|
||||
else:
|
||||
# The 'quantity' field is less than (or equal to) the calculated 'allocated' field
|
||||
return queryset.filter(Q(quantity__lte=F('allocated')))
|
||||
|
||||
@@ -379,7 +379,7 @@ function completePendingShipments(order_id, options={}) {
|
||||
*/
|
||||
function completePendingShipmentsHelper(shipments, shipment_idx, options={}) {
|
||||
if (shipment_idx < shipments.length) {
|
||||
completeSalseOrderShipment(shipments[shipment_idx].pk,
|
||||
completeSalesOrderShipment(shipments[shipment_idx].pk,
|
||||
{
|
||||
buttons: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user