mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 01:45:28 +00:00
pop purchase_price field for StockItemEdit form
This commit is contained in:
1 parent
fe0d356675
commit
2ad090c224
1 file changed
+2
-1
@@ -1307,7 +1307,8 @@ class StockItemEdit(AjaxUpdateView):
|
||||
# If the part cannot be purchased, hide the supplier_part field
|
||||
if not item.part.purchaseable:
|
||||
form.fields['supplier_part'].widget = HiddenInput()
|
||||
form.fields['purchase_price'].widget = HiddenInput()
|
||||
|
||||
form.fields.pop('purchase_price')
|
||||
else:
|
||||
query = form.fields['supplier_part'].queryset
|
||||
query = query.filter(part=item.part.id)
|
||||
|
||||
Reference in new issue
Block a user