fix - transaction & show users with my organization except me

This commit is contained in:
2025-11-01 14:20:27 +03:30
parent 0f6e1ecd28
commit f8320b6e44
4 changed files with 50 additions and 12 deletions

View File

@@ -1,12 +1,14 @@
import string
import random
import string
from django.db import models
from apps.authentication.models import User, Organization
from apps.core.models import BaseModel
from apps.herd.models import Rancher
from apps.pos_device.models import Device
from apps.pos_device.models import POSFreeProducts
from apps.product import models as product_models
from apps.pos_device.models import Device
from apps.herd.models import Rancher
from apps.core.models import BaseModel
from django.db import models
class InventoryEntry(BaseModel):
@@ -130,7 +132,7 @@ class InventoryQuotaSaleTransaction(BaseModel):
@property
def total_weight(self):
""" summation of total sold product weight """
return sum(item.weight for item in self.items.all)
return sum(item.weight for item in self.items.all) # noqa
def __str__(self):
return f"Inventory Sale: {self.transaction_id}-{self.quota_distribution.distribution_id}"