mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-11 07:24:15 +00:00
Improved tests, fixed admin, improved naming
This commit is contained in:
@ -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