# Generated by Django 2.1.7 on 2019-03-13 16:15

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('sales', '0001_initial'),
        ('contenttypes', '0002_remove_content_type_name'),
        ('purchase', '0001_initial'),
        ('partner', '0001_initial'),
        ('mrp', '0001_initial'),
        ('stock', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('product', '0002_auto_20190313_1615'),
    ]

    operations = [
        migrations.AddField(
            model_name='turnbackorderitem',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='turnbackorderitem_location', to='stock.Location', verbose_name='库位'),
        ),
        migrations.AddField(
            model_name='turnbackorderitem',
            name='location_dest',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='turnbackorderitem_location_dest', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='turnbackorderitem',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='mrp.TurnBackOrder', verbose_name='对应订单'),
        ),
        migrations.AddField(
            model_name='turnbackorderitem',
            name='package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.PackageList', verbose_name='码单'),
        ),
        migrations.AddField(
            model_name='turnbackorderitem',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='产品'),
        ),
        migrations.AddField(
            model_name='turnbackorder',
            name='content_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='turnbackorder',
            name='entry',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='turnbackorder_entry', to=settings.AUTH_USER_MODEL, verbose_name='登记人'),
        ),
        migrations.AddField(
            model_name='turnbackorder',
            name='handler',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='turnbackorder_handler', to=settings.AUTH_USER_MODEL, verbose_name='经办人'),
        ),
        migrations.AddField(
            model_name='turnbackorder',
            name='warehouse',
            field=models.ForeignKey(blank=True, help_text='如果没有指定，将会按原单出库仓库接受', null=True, on_delete=django.db.models.deletion.CASCADE, to='stock.Warehouse', verbose_name='接收仓库'),
        ),
        migrations.AddField(
            model_name='productionorderrawitem',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='productionorderrawitem_location', to='stock.Location', verbose_name='库位'),
        ),
        migrations.AddField(
            model_name='productionorderrawitem',
            name='location_dest',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='productionorderrawitem_location_dest', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='productionorderrawitem',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='mrp.ProductionOrder'),
        ),
        migrations.AddField(
            model_name='productionorderrawitem',
            name='package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.PackageList', verbose_name='码单'),
        ),
        migrations.AddField(
            model_name='productionorderrawitem',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='产品'),
        ),
        migrations.AddField(
            model_name='productionorderproduceitem',
            name='draft_package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.DraftPackageList', verbose_name='草稿码单'),
        ),
        migrations.AddField(
            model_name='productionorderproduceitem',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='productionorderproduceitem_location', to='stock.Location', verbose_name='库位'),
        ),
        migrations.AddField(
            model_name='productionorderproduceitem',
            name='location_dest',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='productionorderproduceitem_location_dest', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='productionorderproduceitem',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='produce_items', to='mrp.ProductionOrder', verbose_name='对应生产单'),
        ),
        migrations.AddField(
            model_name='productionorderproduceitem',
            name='package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.PackageList', verbose_name='码单'),
        ),
        migrations.AddField(
            model_name='productionorderproduceitem',
            name='product',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='product'),
        ),
        migrations.AddField(
            model_name='productionorderproduceitem',
            name='raw_item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='produces', to='mrp.ProductionOrderRawItem', verbose_name='原材料'),
        ),
        migrations.AddField(
            model_name='productionorder',
            name='entry',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='productionorder_entry', to=settings.AUTH_USER_MODEL, verbose_name='登记人'),
        ),
        migrations.AddField(
            model_name='productionorder',
            name='handler',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='productionorder_handler', to=settings.AUTH_USER_MODEL, verbose_name='经办人'),
        ),
        migrations.AddField(
            model_name='productionorder',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='productionorder_location', to='stock.Location', verbose_name='原库位'),
        ),
        migrations.AddField(
            model_name='productionorder',
            name='location_dest',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='productionorder_location_dest', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='productionorder',
            name='partner',
            field=models.ForeignKey(limit_choices_to={'type': 'production'}, on_delete=django.db.models.deletion.CASCADE, to='partner.Partner', verbose_name='生产单位'),
        ),
        migrations.AddField(
            model_name='productionorder',
            name='production_type',
            field=models.ForeignKey(limit_choices_to={'activate': True}, on_delete=django.db.models.deletion.CASCADE, to='mrp.ProductionType', verbose_name='业务类型'),
        ),
        migrations.AddField(
            model_name='productionorder',
            name='warehouse',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stock.Warehouse', verbose_name='仓库'),
        ),
        migrations.AddField(
            model_name='movelocationorderitem',
            name='location',
            field=models.ForeignKey(blank=True, limit_choices_to={'is_virtual': False}, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='movelocationorderitem_location', to='stock.Location', verbose_name='库位'),
        ),
        migrations.AddField(
            model_name='movelocationorderitem',
            name='location_dest',
            field=models.ForeignKey(blank=True, limit_choices_to={'is_virtual': False}, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='movelocationorderitem_location_dest', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='movelocationorderitem',
            name='order',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='items', to='mrp.MoveLocationOrder', verbose_name='对应移库单'),
        ),
        migrations.AddField(
            model_name='movelocationorderitem',
            name='package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.PackageList', verbose_name='码单'),
        ),
        migrations.AddField(
            model_name='movelocationorderitem',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='产品'),
        ),
        migrations.AddField(
            model_name='movelocationorder',
            name='entry',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='movelocationorder_entry', to=settings.AUTH_USER_MODEL, verbose_name='登记人'),
        ),
        migrations.AddField(
            model_name='movelocationorder',
            name='handler',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='movelocationorder_handler', to=settings.AUTH_USER_MODEL, verbose_name='经办人'),
        ),
        migrations.AddField(
            model_name='movelocationorder',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='movelocationorder_location', to='stock.Location', verbose_name='原库位'),
        ),
        migrations.AddField(
            model_name='movelocationorder',
            name='location_dest',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='movelocationorder_location_dest', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='movelocationorder',
            name='partner',
            field=models.ForeignKey(blank=True, limit_choices_to={'type': 'service'}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='partner.Partner', verbose_name='运输单位'),
        ),
        migrations.AddField(
            model_name='movelocationorder',
            name='warehouse',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='move_out_warehouse', to='stock.Warehouse', verbose_name='移出仓库'),
        ),
        migrations.AddField(
            model_name='movelocationorder',
            name='warehouse_dest',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='move_in_warehouse', to='stock.Warehouse', verbose_name='接收仓库'),
        ),
        migrations.AddField(
            model_name='inventoryordernewitem',
            name='block',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='product.Block', verbose_name='荒料编号'),
        ),
        migrations.AddField(
            model_name='inventoryordernewitem',
            name='draft_package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.DraftPackageList', verbose_name='草稿码单'),
        ),
        migrations.AddField(
            model_name='inventoryordernewitem',
            name='entry',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inventoryordernewitem_entry', to=settings.AUTH_USER_MODEL, verbose_name='登记人'),
        ),
        migrations.AddField(
            model_name='inventoryordernewitem',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='inventoryordernewitem_location', to='stock.Location', verbose_name='库位'),
        ),
        migrations.AddField(
            model_name='inventoryordernewitem',
            name='location_dest',
            field=models.ForeignKey(limit_choices_to={'is_virtual': False}, on_delete=django.db.models.deletion.DO_NOTHING, related_name='inventoryordernewitem_location_dest', to='stock.Location', verbose_name='实际库位'),
        ),
        migrations.AddField(
            model_name='inventoryordernewitem',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='new_items', to='mrp.InventoryOrder', verbose_name='对应订单'),
        ),
        migrations.AddField(
            model_name='inventoryordernewitem',
            name='package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.PackageList', verbose_name='码单'),
        ),
        migrations.AddField(
            model_name='inventoryordernewitem',
            name='product',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='产品'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='entry',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='inventoryorderitem_entry', to=settings.AUTH_USER_MODEL, verbose_name='登记人'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='inventoryorderitem_location', to='stock.Location', verbose_name='库位'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='location_dest',
            field=models.ForeignKey(blank=True, limit_choices_to={'is_virtual': False}, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='inventoryorderitem_dest_location', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='now_package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='inventoryorderitem_now_package_list', to='product.PackageList', verbose_name='现码单'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='old_location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='inventoryorderitem_old_location', to='stock.Location', verbose_name='原库位'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='old_package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='inventoryorderitem_old_package_list', to='product.PackageList', verbose_name='原库码单'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='mrp.InventoryOrder', verbose_name='对应订单'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.PackageList', verbose_name='码单'),
        ),
        migrations.AddField(
            model_name='inventoryorderitem',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='产品'),
        ),
        migrations.AddField(
            model_name='inventoryorder',
            name='entry',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inventoryorder_entry', to=settings.AUTH_USER_MODEL, verbose_name='登记人'),
        ),
        migrations.AddField(
            model_name='inventoryorder',
            name='handler',
            field=models.ManyToManyField(related_name='inventoryorder_handler', to=settings.AUTH_USER_MODEL, verbose_name='经办人'),
        ),
        migrations.AddField(
            model_name='inventoryorder',
            name='warehouse',
            field=models.ForeignKey(blank=True, help_text='盘点的仓库', null=True, on_delete=django.db.models.deletion.CASCADE, to='stock.Warehouse', verbose_name='仓库'),
        ),
        migrations.AddField(
            model_name='inoutorderitem',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='inoutorderitem_location', to='stock.Location', verbose_name='库位'),
        ),
        migrations.AddField(
            model_name='inoutorderitem',
            name='location_dest',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='inoutorderitem_location_dest', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='inoutorderitem',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='mrp.InOutOrder', verbose_name='对应订单'),
        ),
        migrations.AddField(
            model_name='inoutorderitem',
            name='package_list',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='product.PackageList', verbose_name='码单'),
        ),
        migrations.AddField(
            model_name='inoutorderitem',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Product', verbose_name='产品'),
        ),
        migrations.AddField(
            model_name='inoutorderitem',
            name='purchase_order_item',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='in_out_order_items', to='purchase.PurchaseOrderItem', verbose_name='采购订单明细行'),
        ),
        migrations.AddField(
            model_name='inoutorderitem',
            name='sales_order_item',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='in_out_order_items', to='sales.SalesOrderItem', verbose_name='销售订单明细行'),
        ),
        migrations.AddField(
            model_name='inoutorder',
            name='entry',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inoutorder_entry', to=settings.AUTH_USER_MODEL, verbose_name='登记人'),
        ),
        migrations.AddField(
            model_name='inoutorder',
            name='handler',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='inoutorder_handler', to=settings.AUTH_USER_MODEL, verbose_name='经办人'),
        ),
        migrations.AddField(
            model_name='inoutorder',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='inoutorder_location', to='stock.Location', verbose_name='原库位'),
        ),
        migrations.AddField(
            model_name='inoutorder',
            name='location_dest',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='inoutorder_location_dest', to='stock.Location', verbose_name='目标库位'),
        ),
        migrations.AddField(
            model_name='inoutorder',
            name='partner',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='partner.Partner', verbose_name='业务伙伴'),
        ),
        migrations.AddField(
            model_name='inoutorder',
            name='purchase_order',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='in_out_order', to='purchase.PurchaseOrder', verbose_name='采购单'),
        ),
        migrations.AddField(
            model_name='inoutorder',
            name='sales_order',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='in_out_order', to='sales.SalesOrder', verbose_name='销售单'),
        ),
        migrations.AddField(
            model_name='inoutorder',
            name='warehouse',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='stock.Warehouse', verbose_name='仓库'),
        ),
        migrations.AddField(
            model_name='expenses',
            name='content_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='expenses',
            name='expense',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mrp.ExpensesItem', verbose_name='费用名称'),
        ),
    ]
