2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-05 02:50:58 +00:00

Shipment parameters (#11641)

* Add 'parameter' support for SalesOrderShipment model

* Add "parameters" tab for shipment view

* Playwright test

* Update CHANGELOG

* Update API version

* Install gettext

* Try yaml format

* Revert "Try yaml format"

This reverts commit 394a5551c8.

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
Oliver
2026-04-01 10:31:49 +11:00
committed by GitHub
parent 1f01229d30
commit 6243aec9b7
7 changed files with 16 additions and 2 deletions

View File

@@ -706,7 +706,7 @@ jobs:
npm: true npm: true
install: true install: true
update: true update: true
apt-dependency: postgresql-client libpq-dev apt-dependency: gettext postgresql-client libpq-dev
pip-dependency: psycopg2 pip-dependency: psycopg2
- name: Set up test data - name: Set up test data
run: | run: |

View File

@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### 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. - [#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. - [#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. - [#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.

View File

@@ -1,11 +1,14 @@
"""InvenTree API version information.""" """InvenTree API version information."""
# InvenTree API version # 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.""" """Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """ 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 v468 -> 2026-03-31 : https://github.com/inventree/InvenTree/pull/11649
- Add ordering to contetype related fields - no functional changes - Add ordering to contetype related fields - no functional changes

View File

@@ -2234,6 +2234,7 @@ class SalesOrderShipmentReportContext(report.mixins.BaseReportContext, TypedDict
class SalesOrderShipment( class SalesOrderShipment(
InvenTree.models.InvenTreeParameterMixin,
InvenTree.models.InvenTreeAttachmentMixin, InvenTree.models.InvenTreeAttachmentMixin,
InvenTree.models.InvenTreeBarcodeMixin, InvenTree.models.InvenTreeBarcodeMixin,
InvenTree.models.InvenTreeNotesMixin, InvenTree.models.InvenTreeNotesMixin,

View File

@@ -1320,6 +1320,7 @@ class SalesOrderShipmentSerializer(
'link', 'link',
'notes', 'notes',
# Extra detail fields # Extra detail fields
'parameters',
'checked_by_detail', 'checked_by_detail',
'customer_detail', 'customer_detail',
'order_detail', 'order_detail',
@@ -1375,6 +1376,8 @@ class SalesOrderShipmentSerializer(
prefetch_fields=['shipment_address'], prefetch_fields=['shipment_address'],
) )
parameters = common.filters.enable_parameters_filter()
class SalesOrderAllocationSerializer( class SalesOrderAllocationSerializer(
FilterableSerializerMixin, InvenTreeModelSerializer FilterableSerializerMixin, InvenTreeModelSerializer

View File

@@ -34,6 +34,7 @@ import AttachmentPanel from '../../components/panels/AttachmentPanel';
import NotesPanel from '../../components/panels/NotesPanel'; import NotesPanel from '../../components/panels/NotesPanel';
import type { PanelType } from '../../components/panels/Panel'; import type { PanelType } from '../../components/panels/Panel';
import { PanelGroup } from '../../components/panels/PanelGroup'; import { PanelGroup } from '../../components/panels/PanelGroup';
import ParametersPanel from '../../components/panels/ParametersPanel';
import { RenderAddress } from '../../components/render/Company'; import { RenderAddress } from '../../components/render/Company';
import { RenderUser } from '../../components/render/User'; import { RenderUser } from '../../components/render/User';
import { formatDate } from '../../defaults/formatters'; import { formatDate } from '../../defaults/formatters';
@@ -267,6 +268,10 @@ export default function SalesOrderShipmentDetail() {
/> />
) )
}, },
ParametersPanel({
model_type: ModelType.salesordershipment,
model_id: shipment.pk
}),
AttachmentPanel({ AttachmentPanel({
model_type: ModelType.salesordershipment, model_type: ModelType.salesordershipment,
model_id: shipment.pk model_id: shipment.pk

View File

@@ -193,6 +193,7 @@ test('Sales Orders - Shipments', async ({ browser }) => {
await page.getByRole('cell', { name: tracking_number }).click(); await page.getByRole('cell', { name: tracking_number }).click();
// Click through the various tabs // Click through the various tabs
await loadTab(page, 'Parameters');
await loadTab(page, 'Attachments'); await loadTab(page, 'Attachments');
await loadTab(page, 'Notes'); await loadTab(page, 'Notes');
await loadTab(page, 'Allocated Stock'); await loadTab(page, 'Allocated Stock');