add product serialize to broker - quota statistic by product

This commit is contained in:
2025-07-08 11:59:58 +03:30
parent bafd1fbbcb
commit 90b090e848
5 changed files with 41 additions and 5 deletions

View File

@@ -113,6 +113,7 @@ class Product(BaseModel):
).aggregate(total_entry=models.Sum('warehouse_entry'))['total_entry'] or 0
data = {
'product': self.id,
'quotas_count': quotas_count,
'total_quotas_weight': total_quotas_weight,
'total_remaining_quotas_weight': total_remaining_quotas_weight,