diff --git a/InvenTree/customer_orders/migrations/0003_auto_20180417_1323.py b/InvenTree/customer_orders/migrations/0003_auto_20180417_1323.py new file mode 100644 index 0000000000..3f2de3f15a --- /dev/null +++ b/InvenTree/customer_orders/migrations/0003_auto_20180417_1323.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.12 on 2018-04-17 13:23 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('customer_orders', '0002_auto_20180417_2205'), + ] + + operations = [ + migrations.CreateModel( + name='Customer', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=100, unique=True)), + ('description', models.CharField(max_length=500)), + ('website', models.URLField(blank=True)), + ('address', models.CharField(blank=True, max_length=200)), + ('phone', models.CharField(blank=True, max_length=50)), + ('email', models.EmailField(blank=True, max_length=254)), + ('contact', models.CharField(blank=True, max_length=100)), + ('notes', models.CharField(blank=True, max_length=500)), + ], + options={ + 'abstract': False, + }, + ), + migrations.AlterField( + model_name='customerorder', + name='customer', + field=models.ForeignKey(blank=True, help_text=b'Customer that placed this order', null=True, on_delete=django.db.models.deletion.SET_NULL, to='customer_orders.Customer'), + ), + migrations.AlterField( + model_name='customerorderline', + name='part', + field=models.ForeignKey(blank=True, help_text=b'Part', on_delete=django.db.models.deletion.CASCADE, to='part.Part'), + ), + migrations.AlterField( + model_name='customerorderline', + name='quantity', + field=models.PositiveIntegerField(blank=True, help_text=b'Quantity of part'), + ), + ] diff --git a/InvenTree/customer_orders/models.py b/InvenTree/customer_orders/models.py index f22272075b..057bc0bfa8 100644 --- a/InvenTree/customer_orders/models.py +++ b/InvenTree/customer_orders/models.py @@ -1,11 +1,17 @@ from django.db import models -from supplier.models import Customer +from InvenTree.models import Company from part.models import Part import datetime +class Customer(Company): + """ Represents a customer + """ + pass + + class CustomerOrder(models.Model): """ An order from a customer, made up of multiple 'lines'