mirror of
https://github.com/inventree/InvenTree.git
synced 2026-07-08 08:01:38 +00:00
Part category parameters (#12165)
* Add parameter support for PartCategory * Update frontend * Bump API version * Update CHANGELOG
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
"""InvenTree API version information."""
|
||||
|
||||
# InvenTree API version
|
||||
INVENTREE_API_VERSION = 504
|
||||
INVENTREE_API_VERSION = 505
|
||||
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
|
||||
|
||||
INVENTREE_API_TEXT = """
|
||||
|
||||
v505 -> 2026-06-15 : https://github.com/inventree/InvenTree/pull/12165
|
||||
- Allow parameters to be specified against the PartCategory model
|
||||
|
||||
v504 -> 2026-06-13 : https://github.com/inventree/InvenTree/pull/12139
|
||||
- Adjustments to the SelectionList and SelectionListEntry API endpoints to support more efficient queries and data retrieval
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ logger = structlog.get_logger('inventree')
|
||||
|
||||
class PartCategory(
|
||||
InvenTree.models.PluginValidationMixin,
|
||||
InvenTree.models.InvenTreeParameterMixin,
|
||||
InvenTree.models.MetadataMixin,
|
||||
InvenTree.models.PathStringMixin,
|
||||
InvenTree.models.InvenTreeTree,
|
||||
|
||||
@@ -103,6 +103,8 @@ class CategorySerializer(
|
||||
'structural',
|
||||
'icon',
|
||||
'parent_default_location',
|
||||
# Optional fields
|
||||
'parameters',
|
||||
]
|
||||
read_only_fields = ['level', 'pathstring']
|
||||
|
||||
@@ -176,6 +178,8 @@ class CategorySerializer(
|
||||
|
||||
parent_default_location = serializers.IntegerField(read_only=True, allow_null=True)
|
||||
|
||||
parameters = common.filters.enable_parameters_filter()
|
||||
|
||||
|
||||
class CategoryTree(InvenTree.serializers.InvenTreeModelSerializer):
|
||||
"""Serializer for PartCategory tree."""
|
||||
|
||||
Reference in New Issue
Block a user