Merge remote-tracking branch 'inventree/master'

This commit is contained in:
Oliver Walters 2019-05-09 18:44:29 +10:00
commit b42f7fce44
3 changed files with 10 additions and 5 deletions

View File

@ -284,7 +284,7 @@ class Part(models.Model):
# If this part does NOT have a BOM, result is simply the currently available stock
if not self.has_bom:
return self.available_stock
return 0
total = None

View File

@ -293,6 +293,8 @@ function moveStockItems(items, options) {
//modalSetContent(modal, html);
attachSelect(modal);
modalEnable(modal, true);
$(modal).find('#note-warning').hide();
modalSubmit(modal, function() {

View File

@ -32,13 +32,10 @@ class CreateStockItemForm(HelperForm):
'part',
'supplier_part',
'location',
'belongs_to',
'serial',
'batch',
'quantity',
'status',
'notes',
# 'customer',
'URL',
]
@ -67,7 +64,13 @@ class StocktakeForm(forms.ModelForm):
class EditStockItemForm(HelperForm):
""" Form for editing a StockItem object """
""" Form for editing a StockItem object.
Note that not all fields can be edited here (even if they can be specified during creation.
location - Must be updated in a 'move' transaction
quantity - Must be updated in a 'stocktake' transaction
part - Cannot be edited after creation
"""
class Meta:
model = StockItem