some first models of pos & add required to attributes
This commit is contained in:
@@ -141,8 +141,13 @@ class ProductStats(BaseModel):
|
||||
related_name='stats',
|
||||
null=True
|
||||
)
|
||||
total_quota = models.PositiveBigIntegerField(default=0)
|
||||
quotas_number = models.PositiveBigIntegerField(default=0)
|
||||
active_quotas_weight = models.PositiveBigIntegerField(default=0)
|
||||
closed_quotas_weight = models.PositiveBigIntegerField(default=0)
|
||||
total_quota_weight = models.PositiveBigIntegerField(default=0)
|
||||
total_remaining = models.PositiveBigIntegerField(default=0)
|
||||
total_distributed_weight = models.PositiveBigIntegerField(default=0)
|
||||
total_warehouse_entry = models.PositiveBigIntegerField(default=0)
|
||||
total_sold = models.PositiveBigIntegerField(default=0)
|
||||
total_transactions = models.PositiveBigIntegerField(default=0)
|
||||
|
||||
@@ -150,7 +155,7 @@ class ProductStats(BaseModel):
|
||||
return f'Product: {self.product.name}-{self.product.id} stats'
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
return super(ProductStats).save(*args, **kwargs)
|
||||
return super(ProductStats, self).save(*args, **kwargs)
|
||||
|
||||
|
||||
class Attribute(BaseModel):
|
||||
@@ -170,7 +175,7 @@ class Attribute(BaseModel):
|
||||
related_name="attributes",
|
||||
null=True
|
||||
)
|
||||
|
||||
required = models.BooleanField(default=False)
|
||||
is_global = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user