add some fields to transaction & sale item
This commit is contained in:
@@ -128,8 +128,8 @@ class InventoryQuotaSaleTransactionViewSet(viewsets.ModelViewSet, DynamicSearchM
|
||||
return self.get_paginated_response(serializer.data)
|
||||
|
||||
|
||||
class QuotaPreSaleItemViewSet(viewsets.ModelViewSet):
|
||||
class QuotaPreSaleItemViewSet(viewsets.ModelViewSet, DynamicSearchMixin, POSDeviceMixin):
|
||||
queryset = warehouse_models.QuotaPreSaleItem.objects.all().select_related(
|
||||
'organization', 'transaction', 'sale_item'
|
||||
)
|
||||
serializer_class = warehouse_serializers
|
||||
serializer_class = warehouse_serializers.QuotaPreSaleItemSerializer
|
||||
|
||||
@@ -208,3 +208,7 @@ class QuotaPreSaleItemSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = warehouse_models.QuotaPreSaleItem
|
||||
fields = '__all__'
|
||||
|
||||
def create(self, validated_data):
|
||||
with atomic():
|
||||
pass
|
||||
|
||||
@@ -6,6 +6,7 @@ router = DefaultRouter()
|
||||
|
||||
router.register(r'inventory_entry', api.InventoryEntryViewSet, basename='inventory_entry')
|
||||
router.register(r'transaction', api.InventoryQuotaSaleTransactionViewSet, basename='transaction')
|
||||
router.register(r'pre_sale', api.QuotaPreSaleItemViewSet, basename='pre_sale')
|
||||
|
||||
urlpatterns = [
|
||||
path('v1/', include(router.urls))
|
||||
|
||||
Reference in New Issue
Block a user