From 93211d8ada932f888ce8a50cbc65674ac83a69b3 Mon Sep 17 00:00:00 2001 From: Krophil Date: Wed, 21 Dec 2016 02:55:24 +0100 Subject: [PATCH] operations added in populate --- core/management/commands/populate.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/management/commands/populate.py b/core/management/commands/populate.py index 673d3154..db81f0c1 100644 --- a/core/management/commands/populate.py +++ b/core/management/commands/populate.py @@ -295,10 +295,17 @@ Cette page vise à documenter la syntaxe *Markdown* utilisée sur le site. ca.save() gj = GeneralJournal(name="A16", start_date=date.today(), club_account=ca) gj.save() - credit = AccountingType(code=74, label="Someone gave us money", movement_type='CREDIT') + credit = AccountingType(code='74', label="Someone gave us money", movement_type='CREDIT') credit.save() - debit = AccountingType(code=607, label="Had to pay a beer", movement_type='DEBIT') + debit = AccountingType(code='607', label="Had to pay a beer", movement_type='DEBIT') debit.save() + t = AccountingType(code='602', label="Gros test de malade", movement_type='DEBIT') + t.save() + Operation(journal=gj, date=date.today(), amount=32.3, remark="...", mode="CASH", done=True, accounting_type=t, target_type="USER", target_id=skia.id).save() + t = AccountingType(code='60', label="...", movement_type='DEBIT') + t.save() + Operation(journal=gj, date=date.today(), amount=32.3, remark="...", mode="CASH", done=True, accounting_type=t, target_type="USER", target_id=skia.id).save() + Operation(journal=gj, date=date.today(), amount=46.42, remark="An answer to life...", mode="CASH", done=True, accounting_type=t, target_type="USER", target_id=skia.id).save() Operation(journal=gj, date=date.today(), amount=666.42, remark="An answer to life...", mode="CASH", done=True, accounting_type=credit, target_type="USER", target_id=skia.id).save()