fix - transaction & show users with my organization except me
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user