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:
parent
996dbc5aa8
commit
c9d98cb545
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -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 ? (
|
||||
|
|
|
|||
Loading…
Reference in New Issue