Merge branch 'add_order_state' into 'trunk'

voeg status "afgehaald" toe

See merge request ZeusWPI/mordor!1
This commit is contained in:
flynn 2021-10-12 19:43:39 +00:00
commit 1e82e1f923
3 changed files with 21 additions and 2 deletions

View file

@ -0,0 +1,18 @@
# Generated by Django 3.2.3 on 2021-10-12 19:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mordor', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='order',
name='state',
field=models.IntegerField(choices=[(0, 'open'), (1, 'besteld'), (2, 'geleverd'), (3, 'afgehaald')], default=0),
),
]

View file

@ -11,8 +11,8 @@ class TimeStampMixin(models.Model):
class Order(TimeStampMixin): class Order(TimeStampMixin):
OPEN, ORDERED, DELIVERED = range(3) OPEN, ORDERED, DELIVERED, COLLECTED = range(4)
ORDER_STATES = {OPEN: "open", ORDERED: "besteld", DELIVERED: "geleverd"} ORDER_STATES = {OPEN: "open", ORDERED: "besteld", DELIVERED: "geleverd", COLLECTED: "afgehaald"}
amount_33 = models.IntegerField(default=0, blank=True) amount_33 = models.IntegerField(default=0, blank=True)
amount_50 = models.IntegerField(default=0, blank=True) amount_50 = models.IntegerField(default=0, blank=True)

View file

@ -0,0 +1 @@
#!/usr/bin/env python