mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-04 06:18:48 +00:00
docstring improvements
This commit is contained in:
parent
bc12af5994
commit
87411293cf
@ -92,6 +92,9 @@ class PartCreate(AjaxCreateView):
|
|||||||
return context
|
return context
|
||||||
|
|
||||||
def get_form(self):
|
def get_form(self):
|
||||||
|
""" Create Form for making new Part object.
|
||||||
|
Remove the 'default_supplier' field as there are not yet any matching SupplierPart objects
|
||||||
|
"""
|
||||||
form = super(AjaxCreateView, self).get_form()
|
form = super(AjaxCreateView, self).get_form()
|
||||||
|
|
||||||
# Hide the default_supplier field (there are no matching supplier parts yet!)
|
# Hide the default_supplier field (there are no matching supplier parts yet!)
|
||||||
@ -449,6 +452,9 @@ class SupplierPartCreate(AjaxCreateView):
|
|||||||
context_object_name = 'part'
|
context_object_name = 'part'
|
||||||
|
|
||||||
def get_form(self):
|
def get_form(self):
|
||||||
|
""" Create Form instance to create a new SupplierPart object.
|
||||||
|
Hide some fields if they are not appropriate in context
|
||||||
|
"""
|
||||||
form = super(AjaxCreateView, self).get_form()
|
form = super(AjaxCreateView, self).get_form()
|
||||||
|
|
||||||
if form.initial.get('supplier', None):
|
if form.initial.get('supplier', None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user