You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
761 B
13 lines
761 B
from django.db import models
|
|
from product_directory.models import Product
|
|
|
|
class GoodsReception(models.Model):
|
|
product = models.ForeignKey(Product, on_delete=models.CASCADE, verbose_name="Товар")
|
|
quantity = models.PositiveIntegerField(verbose_name="Количество")
|
|
quality_check = models.BooleanField(verbose_name="Проверка качества")
|
|
shelf_life_valid = models.BooleanField(verbose_name="Срок годности соответствует")
|
|
is_accepted = models.BooleanField(verbose_name="Принят", default=False)
|
|
rejection_reason = models.TextField(verbose_name="Причина отклонения", blank=True, null=True)
|
|
|
|
def __str__(self):
|
|
return f"Приемка: {self.product.name}" |