mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add ability to edit 'delete_on_deplete' field
This commit is contained in:
parent
ac326c135f
commit
027e1cf130
@ -34,6 +34,7 @@ class CreateStockItemForm(HelperForm):
|
||||
'location',
|
||||
'batch',
|
||||
'quantity',
|
||||
'delete_on_deplete',
|
||||
'status',
|
||||
'notes',
|
||||
'URL',
|
||||
@ -78,6 +79,7 @@ class EditStockItemForm(HelperForm):
|
||||
fields = [
|
||||
'supplier_part',
|
||||
'batch',
|
||||
'delete_on_deplete',
|
||||
'status',
|
||||
'notes',
|
||||
'URL',
|
||||
|
@ -286,9 +286,9 @@ class StockItem(models.Model):
|
||||
self.location = location
|
||||
|
||||
self.addTransactionNote(msg,
|
||||
user,
|
||||
notes=notes,
|
||||
system=True)
|
||||
user,
|
||||
notes=notes,
|
||||
system=True)
|
||||
|
||||
self.save()
|
||||
|
||||
@ -296,8 +296,8 @@ class StockItem(models.Model):
|
||||
|
||||
@transaction.atomic
|
||||
def updateQuantity(self, quantity):
|
||||
""" Update stock quantity for this item.
|
||||
|
||||
""" Update stock quantity for this item.
|
||||
|
||||
If the quantity has reached zero, this StockItem will be deleted.
|
||||
|
||||
Returns:
|
||||
|
Loading…
Reference in New Issue
Block a user