update accounting model

This commit is contained in:
Robert Einsle 2017-04-26 10:17:19 +02:00
parent 55cf6101a8
commit 867788cd59
2 changed files with 3 additions and 6 deletions

View File

@ -1,16 +1,13 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-26 10:14
# Generated by Django 1.11 on 2017-04-26 10:17
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('billard', '0020_auto_20170410_1853'),
]
@ -18,6 +15,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='accounting',
name='account_user',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='accountings', to=settings.AUTH_USER_MODEL, verbose_name='Abr. Benutzer'),
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Abr. Benutzer'),
),
]

View File

@ -85,7 +85,7 @@ class Accounting(models.Model):
reporter_uuid = models.UUIDField(blank=True, null=True, verbose_name='Reporter UUID')
prize_normal = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True, verbose_name="Preis Normalzeit")
prize_hh = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True, verbose_name="Preis Happy Hour")
account_user = models.OneToOneField(User, related_name='accountings', verbose_name="Abr. Benutzer", blank=True, null=True)
account_user = models.CharField(blank=True, null=True, max_length=128, verbose_name="Abr. Benutzer")
def __str__(self):
return '{}: {} -> {}, {}, {}'.format(self.desk, self.time_from, self.time_to, self.prize, self.billed)