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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 15 additions and 4 deletions

View File

@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- [#12341](https://github.com/inventree/InvenTree/pull/12341) adds support for importing internal part prices.
- [#12295](https://github.com/inventree/InvenTree/pull/12295) adds "consumable" field to the Part model and API endpoints
- [#12250](https://github.com/inventree/InvenTree/pull/12250) adds "active" field to the ProjectCode model and API endpoints

View File

@ -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

View File

@ -26,6 +26,7 @@ class Migration(migrations.Migration):
],
options={
'unique_together': {('part', 'quantity')},
'verbose_name': 'Part Internal Price Break',
},
),
]

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():

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:

View File

@ -161,7 +161,8 @@ export default function PriceBreakPanel({
part: part.pk
},
tableActions: tableActions,
rowActions: rowActions
rowActions: rowActions,
enableDownload: true
}}
/>
{table.records.length > 0 ? (

View File

@ -55,7 +55,8 @@ export default function SupplierPricingPanel({
base_part: part.pk,
supplier_detail: true,
part_detail: true
}
},
enableDownload: true
}}
/>
{supplierPricingData.length > 0 ? (