Add per-product flag to skip Date and Next Control
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,7 @@ class Product(models.Model):
|
||||
code = models.CharField(max_length=50, unique=True)
|
||||
description = models.CharField(max_length=200)
|
||||
default_net_weight = models.FloatField(default=5.0)
|
||||
requires_dates = models.BooleanField(default=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
@@ -26,8 +27,8 @@ class Order(models.Model):
|
||||
|
||||
product = models.ForeignKey(Product, on_delete=models.CASCADE, related_name='orders')
|
||||
batch_number = models.CharField(max_length=50)
|
||||
production_date = models.DateField(default=timezone.now)
|
||||
next_control_date = models.DateField()
|
||||
production_date = models.DateField(default=timezone.now, null=True, blank=True)
|
||||
next_control_date = models.DateField(null=True, blank=True)
|
||||
total_weight = models.FloatField(default=0)
|
||||
canister_weight = models.FloatField(default=5)
|
||||
canisters_per_box = models.PositiveIntegerField(default=4)
|
||||
|
||||
Reference in New Issue
Block a user