mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-03 04:00:57 +00:00
Mark a SalesOrder as "shipped"
- Option to hide non-stock items from stock list - Update models with new feature
This commit is contained in:
@ -634,6 +634,8 @@ class StockItem(MPTTModel):
|
||||
# Remove the specified quantity from THIS stock item
|
||||
self.take_stock(quantity, user, 'Split {n} items into new stock item'.format(n=quantity))
|
||||
|
||||
# Return a copy of the "new" stock item
|
||||
|
||||
@transaction.atomic
|
||||
def move(self, location, notes, user, **kwargs):
|
||||
""" Move part to a new location.
|
||||
@ -656,6 +658,9 @@ class StockItem(MPTTModel):
|
||||
except InvalidOperation:
|
||||
return False
|
||||
|
||||
if not self.in_stock:
|
||||
raise ValidationError(_("StockItem cannot be moved as it is not in stock"))
|
||||
|
||||
if quantity <= 0:
|
||||
return False
|
||||
|
||||
|
Reference in New Issue
Block a user