Limit SupplierPart options in CreateBomItem form

- If Part is selected, limit the options in supplier_part field
- Only allow supplier_parts which map back to the same part
This commit is contained in:
Oliver Walters committed 2019-04-28 11:24:26 +10:00
1 parent a9fbbc3a37
commit 1171953e65
2 files changed
+23 -7

No files matched your search

-5
View File
@@ -426,11 +426,6 @@ class SupplierPartCreate(AjaxCreateView):
def get_form(self):
form = super(AjaxCreateView, self).get_form()
# Was the form supplied with initial data?
print("Initial:", form.initial)
print(dir(form))
if form.initial.get('supplier', None):
# Hide the supplier field