change: change StockMovemendCreateSerializer

This commit is contained in:
behruz-dev
2025-08-29 11:15:41 +05:00
parent 7c31a393f2
commit 56ee227a68
2 changed files with 3 additions and 2 deletions

View File

@@ -59,6 +59,7 @@ class StockMovmendCreateSerializer(serializers.Serializer):
comment=validated_data.get('comment'),
wherehouse_to=validated_data.get('wherehouse_to'),
wherehouse_from=validated_data.get('wherehouse_from'),
recipient=self.context.get('user'),
)
movmend_products = []
for product in products:
@@ -84,8 +85,8 @@ class StockMovemendProductListSerializer(serializers.ModelSerializer):
def get_product(self, obj):
return {
'id': obj.inventory.product.id,
'name': obj.inventory.product.name,
'type': obj.inventory.product.type,
'name': obj.inventory.product.name,
}
def get_unity(self, obj):