mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-28 02:28:43 +00:00
Set initial value fields to disabled for some forms
- Prevent user from changing certain fields - Only when a form is launched from a particular view
This commit is contained in:
1 parent
2e7253ebc4
commit
c1271367bd
5 files changed
+48
-6
No files matched your search
@@ -239,12 +239,8 @@ class SupplierPartCreate(AjaxCreateView):
|
||||
|
||||
if supplier_id:
|
||||
initials['supplier'] = get_object_or_404(Company, pk=supplier_id)
|
||||
# TODO
|
||||
# self.fields['supplier'].disabled = True
|
||||
if part_id:
|
||||
initials['part'] = get_object_or_404(Part, pk=part_id)
|
||||
# TODO
|
||||
# self.fields['part'].disabled = True
|
||||
|
||||
return initials
|
||||
|
||||
|
||||
Reference in new issue
Block a user