fix inventory balanve & remaining - import provider name in device serializer
This commit is contained in:
@@ -13,6 +13,14 @@ class DeviceSerializer(ModelSerializer):
|
||||
model = pos_models.Device
|
||||
fields = '__all__'
|
||||
|
||||
def to_representation(self, instance):
|
||||
""" custom output of serializer """
|
||||
representation = super().to_representation(instance)
|
||||
|
||||
representation['company'] = {'name': instance.company.name_fa}
|
||||
|
||||
return representation
|
||||
|
||||
|
||||
class DeviceVersionSerializer(ModelSerializer):
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user