Import internal price (#12341)

* Enable download from frontend panels

* Enable data import for part internal pricing

* Bump API version

* Update CHANGELOG
This commit is contained in:
Oliver
2026-07-09 23:17:41 +10:00
committed by GitHub
parent 996dbc5aa8
commit c9d98cb545
7 changed files with 15 additions and 4 deletions
@@ -1,11 +1,14 @@
"""InvenTree API version information."""
# InvenTree API version
INVENTREE_API_VERSION = 517
INVENTREE_API_VERSION = 518
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """
v518 -> 2026-07-09 : https://github.com/inventree/InvenTree/pull/12341
- Enable import of internal part prices via the API
v517 -> 2026-07-08 : https://github.com/inventree/InvenTree/pull/12336
- Fix currency code options for the PartPricing model and API endpoints
@@ -26,6 +26,7 @@ class Migration(migrations.Migration):
],
options={
'unique_together': {('part', 'quantity')},
'verbose_name': 'Part Internal Price Break',
},
),
]
+1
View File
@@ -3599,6 +3599,7 @@ class PartInternalPriceBreak(common.models.PriceBreak):
"""Metaclass providing extra model definition."""
unique_together = ('part', 'quantity')
verbose_name = _('Part Internal Price Break')
@staticmethod
def get_api_url():
+4 -1
View File
@@ -276,7 +276,10 @@ class PartSalePriceSerializer(
)
class PartInternalPriceSerializer(InvenTree.serializers.InvenTreeModelSerializer):
@register_importer()
class PartInternalPriceSerializer(
DataImportExportSerializerMixin, InvenTree.serializers.InvenTreeModelSerializer
):
"""Serializer for internal prices for Part model."""
class Meta:
@@ -161,7 +161,8 @@ export default function PriceBreakPanel({
part: part.pk
},
tableActions: tableActions,
rowActions: rowActions
rowActions: rowActions,
enableDownload: true
}}
/>
{table.records.length > 0 ? (
@@ -55,7 +55,8 @@ export default function SupplierPricingPanel({
base_part: part.pk,
supplier_detail: true,
part_detail: true
}
},
enableDownload: true
}}
/>
{supplierPricingData.length > 0 ? (