inventory entry confirmation - my distributions cahnge filter
This commit is contained in:
@@ -12,7 +12,15 @@ from django.db import models
|
||||
class InventoryEntrySerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = warehouse_models.InventoryEntry
|
||||
fields = '__all__'
|
||||
fields = [
|
||||
"id",
|
||||
"distribution",
|
||||
"weight",
|
||||
"lading_number",
|
||||
"delivery_address",
|
||||
"is_confirmed",
|
||||
"notes",
|
||||
]
|
||||
|
||||
def create(self, validated_data):
|
||||
""" Custom create & set organization """
|
||||
@@ -47,6 +55,12 @@ class InventoryEntrySerializer(serializers.ModelSerializer):
|
||||
|
||||
return attrs
|
||||
|
||||
def to_representation(self, instance):
|
||||
representation = super().to_representation(instance)
|
||||
representation['document'] = instance.document
|
||||
|
||||
return representation
|
||||
|
||||
|
||||
class InventoryQuotaSaleTransactionSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user