mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
add po API endpoints
This commit is contained in:
parent
c30e8d9b4e
commit
2036164ef1
@ -501,6 +501,22 @@ class POLineItemDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
return queryset
|
||||
|
||||
|
||||
class POAdditionalLineItemList(GeneralAdditionalLineItemList, generics.ListCreateAPIView):
|
||||
"""
|
||||
API endpoint for accessing a list of PurchaseOrderAdditionalLineItem objects.
|
||||
"""
|
||||
|
||||
queryset = models.PurchaseOrderAdditionalLineItem.objects.all()
|
||||
serializer_class = serializers.POAdditionalLineItemSerializer
|
||||
|
||||
|
||||
class POAdditionalLineItemDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
""" API endpoint for detail view of a PurchaseOrderAdditionalLineItem object """
|
||||
|
||||
queryset = models.PurchaseOrderAdditionalLineItem.objects.all()
|
||||
serializer_class = serializers.POAdditionalLineItemSerializer
|
||||
|
||||
|
||||
class SOAttachmentList(generics.ListCreateAPIView, AttachmentMixin):
|
||||
"""
|
||||
API endpoint for listing (and creating) a SalesOrderAttachment (file upload)
|
||||
@ -1096,6 +1112,12 @@ order_api_urls = [
|
||||
url(r'^.*$', POLineItemList.as_view(), name='api-po-line-list'),
|
||||
])),
|
||||
|
||||
# API endpoints for purchase order additional line items
|
||||
url(r'^po-additional-line/', include([
|
||||
url(r'^(?P<pk>\d+)/$', POAdditionalLineItemDetail.as_view(), name='api-po-additional-line-detail'),
|
||||
url(r'^$', POAdditionalLineItemList.as_view(), name='api-po-additional-line-list'),
|
||||
])),
|
||||
|
||||
# API endpoints for sales ordesr
|
||||
url(r'^so/', include([
|
||||
url(r'attachment/', include([
|
||||
|
Loading…
Reference in New Issue
Block a user