Merge commit 'd951638e75b4b6fd8dce07ea71ac11bf3ba20a9f' into block-notes

This commit is contained in:
Oliver Walters 2026-06-15 10:59:16 +00:00
commit d7efe02475
6 changed files with 29 additions and 4 deletions

View File

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- [#12165](https://github.com/inventree/InvenTree/pull/12165) adds support for parameters against the PartCategory model
- [#12103](https://github.com/inventree/InvenTree/pull/12103) adds column-based filtering to table views in the user interface. This extends the existing table filtering functionality by allowing users to apply filters directly to individual columns.
- [#12093](https://github.com/inventree/InvenTree/pull/12093) adds "read_only" attribute to PluginSetting API endpoint, which indicates whether a particular plugin setting is read-only (i.e. cannot be modified via the API)
- [#12079](https://github.com/inventree/InvenTree/pull/12079) adds the ability to save filter groups for table and calendar views in the user interface. This allows users to save and reuse commonly used filter configurations, improving the usability and efficiency of the interface.

View File

@ -1,16 +1,19 @@
"""InvenTree API version information."""
# InvenTree API version
INVENTREE_API_VERSION = 505
INVENTREE_API_VERSION = 506
"""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-16 : https://github.com/inventree/InvenTree/pull/11971
v506 -> 2026-06-16 : https://github.com/inventree/InvenTree/pull/11971
- Removes direct "notes" field from any models which previously supported markdown notes
- Adds a generic "Note" model which can be attached to any model type via a generic foreign key relationship
- Allow multiple notes to be attached to a single object, and for notes to be created / edited / deleted via the API
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

View File

@ -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,

View File

@ -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."""

View File

@ -35,6 +35,7 @@ import InstanceDetail from '../../components/nav/InstanceDetail';
import NavigationTree from '../../components/nav/NavigationTree';
import { PageDetail } from '../../components/nav/PageDetail';
import { PanelGroup } from '../../components/panels/PanelGroup';
import ParametersPanel from '../../components/panels/ParametersPanel';
import SegmentedControlPanel from '../../components/panels/SegmentedControlPanel';
import { partCategoryFields } from '../../forms/PartForms';
import {
@ -323,9 +324,14 @@ export default function CategoryDetail() {
/>
)
},
ParametersPanel({
model_type: ModelType.partcategory,
model_id: category?.pk,
hidden: !id || !category.pk
}),
{
name: 'category_parameters',
label: t`Category Parameters`,
label: t`Parameter Templates`,
icon: <IconListCheck />,
hidden: !id || !category.pk,
content: <PartCategoryTemplateTable categoryId={category?.pk} />

View File

@ -1,5 +1,5 @@
import { t } from '@lingui/core/macro';
import { Group, Text } from '@mantine/core';
import { Alert, Group, Stack, Text } from '@mantine/core';
import { useCallback, useMemo, useState } from 'react';
import { AddItemButton } from '@lib/components/AddItemButton';
@ -15,6 +15,7 @@ import useTable from '@lib/hooks/UseTable';
import type { TableFilter } from '@lib/types/Filters';
import type { ApiFormFieldSet } from '@lib/types/Forms';
import type { TableColumn } from '@lib/types/Tables';
import { IconInfoCircle } from '@tabler/icons-react';
import {
useCreateApiFormModal,
useDeleteApiFormModal,
@ -152,6 +153,15 @@ export default function PartCategoryTemplateTable({
{newTemplate.modal}
{editTemplate.modal}
{deleteTemplate.modal}
<Alert
color='blue'
icon={<IconInfoCircle />}
title={t`Part Category Parameters Templates`}
>
<Stack gap='xs'>
<Text>{t`Parts which are created within this category will inherit the default values specified here.`}</Text>
</Stack>
</Alert>
<InvenTreeTable
url={apiUrl(ApiEndpoints.category_parameter_list)}
tableState={table}