mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
b42f7fce44
@ -284,7 +284,7 @@ class Part(models.Model):
|
|||||||
|
|
||||||
# If this part does NOT have a BOM, result is simply the currently available stock
|
# If this part does NOT have a BOM, result is simply the currently available stock
|
||||||
if not self.has_bom:
|
if not self.has_bom:
|
||||||
return self.available_stock
|
return 0
|
||||||
|
|
||||||
total = None
|
total = None
|
||||||
|
|
||||||
|
@ -293,6 +293,8 @@ function moveStockItems(items, options) {
|
|||||||
//modalSetContent(modal, html);
|
//modalSetContent(modal, html);
|
||||||
attachSelect(modal);
|
attachSelect(modal);
|
||||||
|
|
||||||
|
modalEnable(modal, true);
|
||||||
|
|
||||||
$(modal).find('#note-warning').hide();
|
$(modal).find('#note-warning').hide();
|
||||||
|
|
||||||
modalSubmit(modal, function() {
|
modalSubmit(modal, function() {
|
||||||
|
@ -32,13 +32,10 @@ class CreateStockItemForm(HelperForm):
|
|||||||
'part',
|
'part',
|
||||||
'supplier_part',
|
'supplier_part',
|
||||||
'location',
|
'location',
|
||||||
'belongs_to',
|
|
||||||
'serial',
|
|
||||||
'batch',
|
'batch',
|
||||||
'quantity',
|
'quantity',
|
||||||
'status',
|
'status',
|
||||||
'notes',
|
'notes',
|
||||||
# 'customer',
|
|
||||||
'URL',
|
'URL',
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -67,7 +64,13 @@ class StocktakeForm(forms.ModelForm):
|
|||||||
|
|
||||||
|
|
||||||
class EditStockItemForm(HelperForm):
|
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:
|
class Meta:
|
||||||
model = StockItem
|
model = StockItem
|
||||||
|
Loading…
Reference in New Issue
Block a user