order permissions

This commit is contained in:
2025-07-07 10:16:05 +03:30
parent 9a9b55dd28
commit 3035b0c84a
2 changed files with 21 additions and 1 deletions

View File

@@ -112,7 +112,16 @@ class Product(BaseModel):
quota__is_closed=False
).aggregate(total_entry=models.Sum('warehouse_entry'))['total_entry'] or 0
return {'quotas_count': quotas_count, 'total_quotas_weight': total_quotas_weight}
data = {
'quotas_count': quotas_count,
'total_quotas_weight': total_quotas_weight,
'total_remaining_quotas_weight': total_remaining_quotas_weight,
'total_distributed_weight': total_distributed_weight,
'total_sold': total_sold,
'total_warehouse_entry': total_warehouse_entry,
}
return data
def __str__(self):
return f'name: {self.name} - type: {self.type}'