2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

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
2019-04-28 11:24:26 +10:00
parent a9fbbc3a37
commit 1171953e65
2 changed files with 23 additions and 7 deletions

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