From a926e96e93d1305031362fa316e1f2a2a15aef2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigurd=20Lj=C3=B8dal?= Date: Sun, 1 Mar 2015 15:39:52 +0100 Subject: [PATCH] Legg til kassenavn i salgsvare. Ref. #9 --- varer/migrations/0017_salgsvare_kassenavn.py | 20 ++++++++++++++++++++ varer/models.py | 1 + 2 files changed, 21 insertions(+) create mode 100644 varer/migrations/0017_salgsvare_kassenavn.py diff --git a/varer/migrations/0017_salgsvare_kassenavn.py b/varer/migrations/0017_salgsvare_kassenavn.py new file mode 100644 index 00000000..8cd6fd18 --- /dev/null +++ b/varer/migrations/0017_salgsvare_kassenavn.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('varer', '0016_auto_20141227_0243'), + ] + + operations = [ + migrations.AddField( + model_name='salgsvare', + name='kassenavn', + field=models.CharField(max_length=15, help_text='Navn i varekatalog i kassa', blank=True, null=True), + preserve_default=True, + ), + ] diff --git a/varer/models.py b/varer/models.py index e4b3fa45..688b2e61 100644 --- a/varer/models.py +++ b/varer/models.py @@ -83,6 +83,7 @@ class Salgsvare(models.Model): salgskonto = models.ForeignKey(Konto, related_name='salgsvarer') status = models.CharField(max_length=10, choices=Råvare.STATUS_CHOICES, default='OK') kassenr = models.PositiveSmallIntegerField(help_text="Nr i varekatalog i kassa", null=True, blank=True) + kassenavn = models.CharField(max_length=15, help_text="Navn i varekatalog i kassa", null=True, blank=True) raavarer = models.ManyToManyField(Råvare, through='varer.SalgsvareRåvare', related_name='salgsvarer') class Meta: