diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 25f6af9867..95ce4d3824 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -706,7 +706,7 @@ jobs: npm: true install: true update: true - apt-dependency: postgresql-client libpq-dev + apt-dependency: gettext postgresql-client libpq-dev pip-dependency: psycopg2 - name: Set up test data run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b49161ee6..1767e3ab14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- [#11641](https://github.com/inventree/InvenTree/pull/11641) adds support for custom parameters against the SalesOrderShipment model. - [#11527](https://github.com/inventree/InvenTree/pull/11527) adds a new API endpoint for monitoring the status of a particular background task. This endpoint allows clients to check the status of a background task and receive updates when the task is complete. This is useful for long-running tasks that may take some time to complete, allowing clients to provide feedback to users about the progress of the task. - [#11405](https://github.com/inventree/InvenTree/pull/11405) adds default table filters, which hide inactive items by default. The default table filters are overridden by user filter selection, and only apply to the table view initially presented to the user. This means that users can still view inactive items if they choose to, but they will not be shown by default. - [#11222](https://github.com/inventree/InvenTree/pull/11222) adds support for data import using natural keys, allowing for easier association of related objects without needing to know their internal database IDs. diff --git a/src/backend/InvenTree/InvenTree/api_version.py b/src/backend/InvenTree/InvenTree/api_version.py index 2c6773ae7e..182c008bd8 100644 --- a/src/backend/InvenTree/InvenTree/api_version.py +++ b/src/backend/InvenTree/InvenTree/api_version.py @@ -1,11 +1,14 @@ """InvenTree API version information.""" # InvenTree API version -INVENTREE_API_VERSION = 468 +INVENTREE_API_VERSION = 469 """Increment this API version number whenever there is a significant change to the API that any clients need to know about.""" INVENTREE_API_TEXT = """ +v469 -> 2026-03-31 : https://github.com/inventree/InvenTree/pull/11641 + - Adds parameter support to the SalesOrderShipment model and API endpoints + v468 -> 2026-03-31 : https://github.com/inventree/InvenTree/pull/11649 - Add ordering to contetype related fields - no functional changes diff --git a/src/backend/InvenTree/order/models.py b/src/backend/InvenTree/order/models.py index e32caf693f..2d7a550aea 100644 --- a/src/backend/InvenTree/order/models.py +++ b/src/backend/InvenTree/order/models.py @@ -2234,6 +2234,7 @@ class SalesOrderShipmentReportContext(report.mixins.BaseReportContext, TypedDict class SalesOrderShipment( + InvenTree.models.InvenTreeParameterMixin, InvenTree.models.InvenTreeAttachmentMixin, InvenTree.models.InvenTreeBarcodeMixin, InvenTree.models.InvenTreeNotesMixin, diff --git a/src/backend/InvenTree/order/serializers.py b/src/backend/InvenTree/order/serializers.py index a2f179425e..0721ff312b 100644 --- a/src/backend/InvenTree/order/serializers.py +++ b/src/backend/InvenTree/order/serializers.py @@ -1320,6 +1320,7 @@ class SalesOrderShipmentSerializer( 'link', 'notes', # Extra detail fields + 'parameters', 'checked_by_detail', 'customer_detail', 'order_detail', @@ -1375,6 +1376,8 @@ class SalesOrderShipmentSerializer( prefetch_fields=['shipment_address'], ) + parameters = common.filters.enable_parameters_filter() + class SalesOrderAllocationSerializer( FilterableSerializerMixin, InvenTreeModelSerializer diff --git a/src/frontend/src/pages/sales/SalesOrderShipmentDetail.tsx b/src/frontend/src/pages/sales/SalesOrderShipmentDetail.tsx index 2ddd8e5077..e8383ade7a 100644 --- a/src/frontend/src/pages/sales/SalesOrderShipmentDetail.tsx +++ b/src/frontend/src/pages/sales/SalesOrderShipmentDetail.tsx @@ -34,6 +34,7 @@ import AttachmentPanel from '../../components/panels/AttachmentPanel'; import NotesPanel from '../../components/panels/NotesPanel'; import type { PanelType } from '../../components/panels/Panel'; import { PanelGroup } from '../../components/panels/PanelGroup'; +import ParametersPanel from '../../components/panels/ParametersPanel'; import { RenderAddress } from '../../components/render/Company'; import { RenderUser } from '../../components/render/User'; import { formatDate } from '../../defaults/formatters'; @@ -267,6 +268,10 @@ export default function SalesOrderShipmentDetail() { /> ) }, + ParametersPanel({ + model_type: ModelType.salesordershipment, + model_id: shipment.pk + }), AttachmentPanel({ model_type: ModelType.salesordershipment, model_id: shipment.pk diff --git a/src/frontend/tests/pages/pui_sales_order.spec.ts b/src/frontend/tests/pages/pui_sales_order.spec.ts index 25d9a464f2..481433d77b 100644 --- a/src/frontend/tests/pages/pui_sales_order.spec.ts +++ b/src/frontend/tests/pages/pui_sales_order.spec.ts @@ -193,6 +193,7 @@ test('Sales Orders - Shipments', async ({ browser }) => { await page.getByRole('cell', { name: tracking_number }).click(); // Click through the various tabs + await loadTab(page, 'Parameters'); await loadTab(page, 'Attachments'); await loadTab(page, 'Notes'); await loadTab(page, 'Allocated Stock');