|
@ -50,12 +50,13 @@ class ConcreteExtern(Extern): |
|
|
''' needed because we can't initiate abstract base classes in the view''' |
|
|
''' needed because we can't initiate abstract base classes in the view''' |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
class Accounts(models.Model): |
|
|
|
|
|
acc = models.CharField('Kostenstelle', max_length=5, default="DEF", |
|
|
|
|
|
choices=ACCOUNTS.items(), null=False, primary_key = True) |
|
|
|
|
|
|
|
|
class Account(models.Model): |
|
|
|
|
|
code = models.CharField('Kostenstelle', max_length=5, default="DEF", |
|
|
|
|
|
null=False, primary_key = True) |
|
|
|
|
|
description = models.CharField('Beschreibung', max_length=30, default='NO DESCRIPTION') |
|
|
|
|
|
|
|
|
def __str__(self): |
|
|
def __str__(self): |
|
|
return f"{ACCOUNTS[self.acc]}" |
|
|
|
|
|
|
|
|
return f"{self.code} {self.description}" |
|
|
|
|
|
|
|
|
class Project(Volunteer): |
|
|
class Project(Volunteer): |
|
|
name = models.CharField(max_length=200, verbose_name='Name des Projekts') |
|
|
name = models.CharField(max_length=200, verbose_name='Name des Projekts') |
|
@ -74,7 +75,7 @@ class Project(Volunteer): |
|
|
insurance_technic = models.BooleanField(default=False, verbose_name='Technikversicherung Ausland') |
|
|
insurance_technic = models.BooleanField(default=False, verbose_name='Technikversicherung Ausland') |
|
|
support = models.CharField(max_length=300, blank=True, null=True, verbose_name='Betreuungsperson und Vertretung') |
|
|
support = models.CharField(max_length=300, blank=True, null=True, verbose_name='Betreuungsperson und Vertretung') |
|
|
cost = models.IntegerField(blank=True, null=True) |
|
|
cost = models.IntegerField(blank=True, null=True) |
|
|
account = models.ForeignKey('Accounts', on_delete=models.CASCADE, null=True, to_field='acc') |
|
|
|
|
|
|
|
|
account = models.ForeignKey('Account', on_delete=models.CASCADE, null=True, to_field='code') |
|
|
granted_from = models.CharField(max_length=100,null=True,verbose_name='Bewilligt von') |
|
|
granted_from = models.CharField(max_length=100,null=True,verbose_name='Bewilligt von') |
|
|
notes = models.CharField(max_length=1000,null=True,blank=True,verbose_name='Anmerkungen') |
|
|
notes = models.CharField(max_length=1000,null=True,blank=True,verbose_name='Anmerkungen') |
|
|
|
|
|
|
|
|