mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-12 06:18:48 +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:
@@ -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
|
||||
|
||||
|
||||
@@ -2234,6 +2234,7 @@ class SalesOrderShipmentReportContext(report.mixins.BaseReportContext, TypedDict
|
||||
|
||||
|
||||
class SalesOrderShipment(
|
||||
InvenTree.models.InvenTreeParameterMixin,
|
||||
InvenTree.models.InvenTreeAttachmentMixin,
|
||||
InvenTree.models.InvenTreeBarcodeMixin,
|
||||
InvenTree.models.InvenTreeNotesMixin,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user