mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Moved "Customer" to CustomerOrders models
This commit is contained in:
parent
b547f6b309
commit
05cb2fe167
@ -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'),
|
||||
),
|
||||
]
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user