forked from erp-dev/erp
feat: added n-to-1 relation between sales_order_item and printing_job model
This commit is contained in:
@@ -9,6 +9,10 @@ from api_v1.views.stock_change_views.mixins import StockChangeViewMixin
|
||||
|
||||
|
||||
class SalesOrderItemSerializer(serializers.ModelSerializer):
|
||||
quantity_of_rolls = serializers.SerializerMethodField(read_only=True)
|
||||
def get_quantity_of_rolls(self, obj: business_models.SalesOrderItem):
|
||||
return obj.split_quantity_of_rolls()
|
||||
|
||||
class Meta:
|
||||
model = business_models.SalesOrderItem
|
||||
fields = [
|
||||
|
||||
Reference in New Issue
Block a user