mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-01 16:10:43 +00:00
Improved tests, fixed admin, improved naming
This commit is contained in:
1 parent
1c14c2237a
commit
e401bb8e3c
5 files changed
+42
-15
No files matched your search
@@ -277,14 +277,7 @@ class ParameterAdmin(ImportExportModelAdmin):
|
||||
|
||||
class PartCategoryParameterAdmin(admin.ModelAdmin):
|
||||
|
||||
def get_form(self, request, obj=None, **kwargs):
|
||||
""" Display only parent categories as choices for category field """
|
||||
|
||||
form = super().get_form(request, obj, **kwargs)
|
||||
|
||||
form.base_fields['category'].choices = PartCategory.get_parent_categories()
|
||||
|
||||
return form
|
||||
pass
|
||||
|
||||
|
||||
class PartSellPriceBreakAdmin(admin.ModelAdmin):
|
||||
|
||||
Reference in new issue
Block a user