change permissions name unique
This commit is contained in:
@@ -92,3 +92,18 @@ class AttributeValue(BaseModel):
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
return super(AttributeValue, self).save(*args, **kwargs)
|
||||
|
||||
|
||||
class SaleUnit(BaseModel):
|
||||
product = models.ForeignKey(
|
||||
ReferenceProduct,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='sale_unit',
|
||||
null=True
|
||||
)
|
||||
unit = models.CharField(max_length=255, null=True)
|
||||
variation_coefficient = models.CharField(max_length=255, null=True)
|
||||
required = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.product} - {self.unit} - {self.variation_coefficient}'
|
||||
|
||||
Reference in New Issue
Block a user