from django.db import models
from django.contrib.auth.models import User
class Product(models.Model):
name = models.CharField(max_length = 127)
description = models.TextField()
code = models.CharField(max_length = 30)
lot_no = models.CharField(max_length = 30)
inventory = models.IntegerField()
commited = models.IntegerField()
available = models.IntegerField()
reorder = models.IntegerField()
created_date = models.DateField(auto_now_add = True)
comment_user = models.ForeignKey(User, null=True)
comment_txt = models.TextField()
def __unicode__(self):
return self.code + " - " + self.name + " - " + self.lot_no + " - " + str(self.created_date)
나는 그와 같은 수학 기능을 가질 수있을 것입니다 궁금 해서요
가능 = 재고 - 같은 comitted 사람이 재고에 대한 값을 입력하고 comitted 때 2과 장소를 빼는 것 그 값을 사용할 수 있습니다. 인벤토리 재주문이 가능하다면 < = 사용 가능합니다. 빨간색 글 상자 또는 그와 유사한 것으로 플래그가 지정됩니다. 수학 기능뿐만 아니라 플래그
는
이 작업을 수행하는 방법을 이해하지 못해서 자세한 정보를 얻을 수 있습니까? – Jon