forked from DGNum/gestioCOF
create checkout dynamically
This commit is contained in:
parent
1062fd480f
commit
4e62eb0aee
3 changed files with 12 additions and 3 deletions
|
@ -1 +0,0 @@
|
|||
[{"fields": {"name": "Chaudron", "created_by": 101, "is_protected": false, "valid_from": "2017-02-06T23:00:00Z", "valid_to": "2018-08-30T22:00:00Z", "balance": "0.00"}, "model": "kfet.checkout", "pk": 1}]
|
|
@ -81,13 +81,23 @@ class Command(MyBaseCommand):
|
|||
liq_account = Account.objects.get_or_create(cofprofile=liq_profile,
|
||||
trigramme='LIQ')
|
||||
|
||||
# ---
|
||||
# Caisse
|
||||
# ---
|
||||
|
||||
checkout = Checkout.objects.get_or_create(
|
||||
created_by=Account.objects.get(username='Moralelastix'),
|
||||
name='Chaudron',
|
||||
valid_from=timezone.now(),
|
||||
valid_to=timezone.now() + timedelta(years=1)
|
||||
)
|
||||
|
||||
# ---
|
||||
# Opérations
|
||||
# ---
|
||||
|
||||
articles = Article.objects.all()
|
||||
accounts = Account.objects.exclude(trigramme='LIQ')
|
||||
checkout = Checkout.objects.all()[0]
|
||||
|
||||
num_op = 100
|
||||
# Operations are put uniformly over the span of a week
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
source ~/venv/bin/activate
|
||||
python manage.py migrate
|
||||
python manage.py loaddata gestion sites articles checkout
|
||||
python manage.py loaddata gestion sites articles
|
||||
python manage.py loaddevdata
|
||||
python manage.py collectstatic --noinput
|
||||
|
|
Loading…
Reference in a new issue