From 75121c068eb714533ce6be4319cb2f879ad384df Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 17 Jan 2026 23:23:15 +1100 Subject: [PATCH] Enable export of supplier price break data (#11153) * Enable export of supplier price break data * Bump API version --- src/backend/InvenTree/InvenTree/api_version.py | 5 ++++- src/backend/InvenTree/company/api.py | 6 +++++- src/backend/InvenTree/company/serializers.py | 2 +- .../src/tables/purchasing/SupplierPriceBreakTable.tsx | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/backend/InvenTree/InvenTree/api_version.py b/src/backend/InvenTree/InvenTree/api_version.py index 474730c9da..ab288f9d24 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 = 440 +INVENTREE_API_VERSION = 441 """Increment this API version number whenever there is a significant change to the API that any clients need to know about.""" INVENTREE_API_TEXT = """ +v441 -> 2026-01-17 : https://github.com/inventree/InvenTree/pull/11153 + - Allow export of supplier part pricing data + v440 -> 2026-01-15 : https://github.com/inventree/InvenTree/pull/10796 - Adds confirm and confirm_text to all settings diff --git a/src/backend/InvenTree/company/api.py b/src/backend/InvenTree/company/api.py index 66ea55be4c..cc58b4096f 100644 --- a/src/backend/InvenTree/company/api.py +++ b/src/backend/InvenTree/company/api.py @@ -447,7 +447,11 @@ class SupplierPriceBreakOutputOptions(OutputConfiguration): class SupplierPriceBreakList( - SupplierPriceBreakMixin, SerializerContextMixin, OutputOptionsMixin, ListCreateAPI + DataExportViewMixin, + SupplierPriceBreakMixin, + SerializerContextMixin, + OutputOptionsMixin, + ListCreateAPI, ): """API endpoint for list view of SupplierPriceBreak object. diff --git a/src/backend/InvenTree/company/serializers.py b/src/backend/InvenTree/company/serializers.py index 53f10eb961..ef12834e38 100644 --- a/src/backend/InvenTree/company/serializers.py +++ b/src/backend/InvenTree/company/serializers.py @@ -540,8 +540,8 @@ class SupplierPartSerializer( @register_importer() class SupplierPriceBreakSerializer( - SupplierPriceBreakBriefSerializer, DataImportExportSerializerMixin, + SupplierPriceBreakBriefSerializer, InvenTreeModelSerializer, ): """Serializer for SupplierPriceBreak object. diff --git a/src/frontend/src/tables/purchasing/SupplierPriceBreakTable.tsx b/src/frontend/src/tables/purchasing/SupplierPriceBreakTable.tsx index 2240423340..489a19bf0c 100644 --- a/src/frontend/src/tables/purchasing/SupplierPriceBreakTable.tsx +++ b/src/frontend/src/tables/purchasing/SupplierPriceBreakTable.tsx @@ -206,7 +206,8 @@ export default function SupplierPriceBreakTable({ supplier_detail: true }, tableActions: tableActions, - rowActions: rowActions + rowActions: rowActions, + enableDownload: true }} />