Esempio n. 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('order', '0015_auto_20200201_2346'),
    ]

    operations = [
        migrations.CreateModel(
            name='PurchaseOrderAttachment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('attachment',
                 models.FileField(
                     help_text='Select file to attach',
                     upload_to=InvenTree.models.rename_attachment)),
                ('comment',
                 models.CharField(help_text='File comment', max_length=100)),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='attachments',
                                   to='order.PurchaseOrder')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('company', '0042_supplierpricebreak_updated'),
    ]

    operations = [
        migrations.CreateModel(
            name='ManufacturerPartAttachment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('attachment',
                 models.FileField(blank=True,
                                  help_text='Select file to attach',
                                  null=True,
                                  upload_to=InvenTree.models.rename_attachment,
                                  verbose_name='Attachment')),
                ('link',
                 InvenTree.fields.InvenTreeURLField(
                     blank=True,
                     help_text='Link to external URL',
                     null=True,
                     verbose_name='Link')),
                ('comment',
                 models.CharField(blank=True,
                                  help_text='File comment',
                                  max_length=100,
                                  verbose_name='Comment')),
                ('upload_date',
                 models.DateField(auto_now_add=True,
                                  null=True,
                                  verbose_name='upload date')),
                ('manufacturer_part',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='attachments',
                                   to='company.manufacturerpart',
                                   verbose_name='Manufacturer Part')),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     help_text='User',
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='User')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Esempio n. 3
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('build', '0021_auto_20201020_0908_squashed_0026_auto_20201023_1228'),
    ]

    operations = [
        migrations.CreateModel(
            name='BuildOrderAttachment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attachment', models.FileField(help_text='Select file to attach', upload_to=InvenTree.models.rename_attachment)),
                ('comment', models.CharField(blank=True, help_text='File comment', max_length=100)),
                ('upload_date', models.DateField(auto_now_add=True, null=True)),
                ('build', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='build.Build')),
                ('user', models.ForeignKey(blank=True, help_text='User', null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Esempio n. 4
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0021_remove_supplierpart_manufacturer_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('order', '0019_purchaseorder_supplier_reference'),
    ]

    operations = [
        migrations.CreateModel(
            name='SalesOrder',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('reference',
                 models.CharField(help_text='Order reference',
                                  max_length=64,
                                  unique=True)),
                ('description',
                 models.CharField(help_text='Order description',
                                  max_length=250)),
                ('link',
                 models.URLField(blank=True,
                                 help_text='Link to external page')),
                ('creation_date', models.DateField(blank=True, null=True)),
                ('status',
                 models.PositiveIntegerField(choices=[(10, 'Pending'),
                                                      (20, 'Placed'),
                                                      (30, 'Complete'),
                                                      (40, 'Cancelled'),
                                                      (50, 'Lost'),
                                                      (60, 'Returned')],
                                             default=10,
                                             help_text='Order status')),
                ('issue_date', models.DateField(blank=True, null=True)),
                ('complete_date', models.DateField(blank=True, null=True)),
                ('notes',
                 markdownx.models.MarkdownxField(blank=True,
                                                 help_text='Order notes')),
                ('customer_reference',
                 models.CharField(blank=True,
                                  help_text='Customer order reference code',
                                  max_length=64)),
                ('created_by',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to=settings.AUTH_USER_MODEL)),
                ('customer',
                 models.ForeignKey(
                     help_text='Customer',
                     limit_choices_to={True, 'is_supplier'},
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='sales_orders',
                     to='company.Company')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='supplier',
            field=models.ForeignKey(
                help_text='Supplier',
                limit_choices_to={'is_supplier': True},
                on_delete=django.db.models.deletion.CASCADE,
                related_name='purchase_orders',
                to='company.Company'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='supplier_reference',
            field=models.CharField(blank=True,
                                   help_text='Supplier order reference code',
                                   max_length=64),
        ),
        migrations.CreateModel(
            name='SalesOrderLineItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity',
                 InvenTree.fields.RoundingDecimalField(
                     decimal_places=5,
                     default=1,
                     help_text='Item quantity',
                     max_digits=15,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('reference',
                 models.CharField(blank=True,
                                  help_text='Line item reference',
                                  max_length=100)),
                ('notes',
                 models.CharField(blank=True,
                                  help_text='Line item notes',
                                  max_length=500)),
                ('order',
                 models.ForeignKey(help_text='Sales Order',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='lines',
                                   to='order.SalesOrder')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SalesOrderAttachment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('attachment',
                 models.FileField(
                     help_text='Select file to attach',
                     upload_to=InvenTree.models.rename_attachment)),
                ('comment',
                 models.CharField(help_text='File comment', max_length=100)),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='attachments',
                                   to='order.SalesOrder')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Esempio n. 5
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0032_auto_20210403_1837'),
        ('part', '0063_bomitem_inherited'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('stock', '0058_stockitem_packaging'),
        ('order', '0043_auto_20210330_0013'),
    ]

    operations = [
        migrations.AlterField(
            model_name='purchaseorder',
            name='created_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='+',
                to=settings.AUTH_USER_MODEL,
                verbose_name='Created By'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='creation_date',
            field=models.DateField(blank=True,
                                   null=True,
                                   verbose_name='Creation Date'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='description',
            field=models.CharField(help_text='Order description',
                                   max_length=250,
                                   verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='link',
            field=models.URLField(blank=True,
                                  help_text='Link to external page',
                                  verbose_name='Link'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='notes',
            field=markdownx.models.MarkdownxField(blank=True,
                                                  help_text='Order notes',
                                                  verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='received_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='+',
                to=settings.AUTH_USER_MODEL,
                verbose_name='received by'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='reference',
            field=models.CharField(help_text='Order reference',
                                   max_length=64,
                                   unique=True,
                                   verbose_name='Reference'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='supplier',
            field=models.ForeignKey(
                help_text='Company from which the items are being ordered',
                limit_choices_to={'is_supplier': True},
                on_delete=django.db.models.deletion.CASCADE,
                related_name='purchase_orders',
                to='company.Company',
                verbose_name='Supplier'),
        ),
        migrations.AlterField(
            model_name='purchaseorder',
            name='supplier_reference',
            field=models.CharField(blank=True,
                                   help_text='Supplier order reference code',
                                   max_length=64,
                                   verbose_name='Supplier Reference'),
        ),
        migrations.AlterField(
            model_name='purchaseorderattachment',
            name='attachment',
            field=models.FileField(
                help_text='Select file to attach',
                upload_to=InvenTree.models.rename_attachment,
                verbose_name='Attachment'),
        ),
        migrations.AlterField(
            model_name='purchaseorderattachment',
            name='comment',
            field=models.CharField(blank=True,
                                   help_text='File comment',
                                   max_length=100,
                                   verbose_name='Comment'),
        ),
        migrations.AlterField(
            model_name='purchaseorderattachment',
            name='upload_date',
            field=models.DateField(auto_now_add=True,
                                   null=True,
                                   verbose_name='upload date'),
        ),
        migrations.AlterField(
            model_name='purchaseorderattachment',
            name='user',
            field=models.ForeignKey(
                blank=True,
                help_text='User',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL,
                verbose_name='User'),
        ),
        migrations.AlterField(
            model_name='purchaseorderlineitem',
            name='notes',
            field=models.CharField(blank=True,
                                   help_text='Line item notes',
                                   max_length=500,
                                   verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='purchaseorderlineitem',
            name='order',
            field=models.ForeignKey(
                help_text='Purchase Order',
                on_delete=django.db.models.deletion.CASCADE,
                related_name='lines',
                to='order.PurchaseOrder',
                verbose_name='Order'),
        ),
        migrations.AlterField(
            model_name='purchaseorderlineitem',
            name='part',
            field=models.ForeignKey(
                blank=True,
                help_text='Supplier part',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='purchase_order_line_items',
                to='company.SupplierPart',
                verbose_name='Part'),
        ),
        migrations.AlterField(
            model_name='purchaseorderlineitem',
            name='quantity',
            field=InvenTree.fields.RoundingDecimalField(
                decimal_places=5,
                default=1,
                help_text='Item quantity',
                max_digits=15,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name='Quantity'),
        ),
        migrations.AlterField(
            model_name='purchaseorderlineitem',
            name='received',
            field=models.DecimalField(decimal_places=5,
                                      default=0,
                                      help_text='Number of items received',
                                      max_digits=15,
                                      verbose_name='Received'),
        ),
        migrations.AlterField(
            model_name='purchaseorderlineitem',
            name='reference',
            field=models.CharField(blank=True,
                                   help_text='Line item reference',
                                   max_length=100,
                                   verbose_name='Reference'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='created_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='+',
                to=settings.AUTH_USER_MODEL,
                verbose_name='Created By'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='creation_date',
            field=models.DateField(blank=True,
                                   null=True,
                                   verbose_name='Creation Date'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='customer',
            field=models.ForeignKey(
                help_text='Company to which the items are being sold',
                limit_choices_to={'is_customer': True},
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='sales_orders',
                to='company.Company',
                verbose_name='Customer'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='customer_reference',
            field=models.CharField(blank=True,
                                   help_text='Customer order reference code',
                                   max_length=64,
                                   verbose_name='Customer Reference '),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='description',
            field=models.CharField(help_text='Order description',
                                   max_length=250,
                                   verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='link',
            field=models.URLField(blank=True,
                                  help_text='Link to external page',
                                  verbose_name='Link'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='notes',
            field=markdownx.models.MarkdownxField(blank=True,
                                                  help_text='Order notes',
                                                  verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='reference',
            field=models.CharField(help_text='Order reference',
                                   max_length=64,
                                   unique=True,
                                   verbose_name='Reference'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='shipment_date',
            field=models.DateField(blank=True,
                                   null=True,
                                   verbose_name='Shipment Date'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='shipped_by',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='+',
                to=settings.AUTH_USER_MODEL,
                verbose_name='shipped by'),
        ),
        migrations.AlterField(
            model_name='salesorder',
            name='status',
            field=models.PositiveIntegerField(
                choices=[(10, 'Pending'), (20, 'Shipped'), (40, 'Cancelled'),
                         (50, 'Lost'),
                         (60, 'Returned')],
                default=10,
                help_text='Purchase order status',
                verbose_name='Status'),
        ),
        migrations.AlterField(
            model_name='salesorderallocation',
            name='item',
            field=models.ForeignKey(
                help_text='Select stock item to allocate',
                limit_choices_to={
                    'belongs_to': None,
                    'part__salable': True,
                    'sales_order': None
                },
                on_delete=django.db.models.deletion.CASCADE,
                related_name='sales_order_allocations',
                to='stock.StockItem',
                verbose_name='Item'),
        ),
        migrations.AlterField(
            model_name='salesorderallocation',
            name='line',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='allocations',
                to='order.SalesOrderLineItem',
                verbose_name='Line'),
        ),
        migrations.AlterField(
            model_name='salesorderallocation',
            name='quantity',
            field=InvenTree.fields.RoundingDecimalField(
                decimal_places=5,
                default=1,
                help_text='Enter stock allocation quantity',
                max_digits=15,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name='Quantity'),
        ),
        migrations.AlterField(
            model_name='salesorderattachment',
            name='attachment',
            field=models.FileField(
                help_text='Select file to attach',
                upload_to=InvenTree.models.rename_attachment,
                verbose_name='Attachment'),
        ),
        migrations.AlterField(
            model_name='salesorderattachment',
            name='comment',
            field=models.CharField(blank=True,
                                   help_text='File comment',
                                   max_length=100,
                                   verbose_name='Comment'),
        ),
        migrations.AlterField(
            model_name='salesorderattachment',
            name='upload_date',
            field=models.DateField(auto_now_add=True,
                                   null=True,
                                   verbose_name='upload date'),
        ),
        migrations.AlterField(
            model_name='salesorderattachment',
            name='user',
            field=models.ForeignKey(
                blank=True,
                help_text='User',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL,
                verbose_name='User'),
        ),
        migrations.AlterField(
            model_name='salesorderlineitem',
            name='notes',
            field=models.CharField(blank=True,
                                   help_text='Line item notes',
                                   max_length=500,
                                   verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='salesorderlineitem',
            name='order',
            field=models.ForeignKey(
                help_text='Sales Order',
                on_delete=django.db.models.deletion.CASCADE,
                related_name='lines',
                to='order.SalesOrder',
                verbose_name='Order'),
        ),
        migrations.AlterField(
            model_name='salesorderlineitem',
            name='part',
            field=models.ForeignKey(
                help_text='Part',
                limit_choices_to={'salable': True},
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='sales_order_line_items',
                to='part.Part',
                verbose_name='Part'),
        ),
        migrations.AlterField(
            model_name='salesorderlineitem',
            name='quantity',
            field=InvenTree.fields.RoundingDecimalField(
                decimal_places=5,
                default=1,
                help_text='Item quantity',
                max_digits=15,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name='Quantity'),
        ),
        migrations.AlterField(
            model_name='salesorderlineitem',
            name='reference',
            field=models.CharField(blank=True,
                                   help_text='Line item reference',
                                   max_length=100,
                                   verbose_name='Reference'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('stock', '0058_stockitem_packaging'),
        ('part', '0063_bomitem_inherited'),
    ]

    operations = [
        migrations.AlterField(
            model_name='bomitem',
            name='checksum',
            field=models.CharField(blank=True, help_text='BOM line checksum', max_length=128, verbose_name='Checksum'),
        ),
        migrations.AlterField(
            model_name='bomitem',
            name='note',
            field=models.CharField(blank=True, help_text='BOM item notes', max_length=500, verbose_name='Note'),
        ),
        migrations.AlterField(
            model_name='bomitem',
            name='optional',
            field=models.BooleanField(default=False, help_text='This BOM item is optional', verbose_name='Optional'),
        ),
        migrations.AlterField(
            model_name='bomitem',
            name='overage',
            field=models.CharField(blank=True, help_text='Estimated build wastage quantity (absolute or percentage)', max_length=24, validators=[InvenTree.validators.validate_overage], verbose_name='Overage'),
        ),
        migrations.AlterField(
            model_name='bomitem',
            name='part',
            field=models.ForeignKey(help_text='Select parent part', limit_choices_to={'assembly': True}, on_delete=django.db.models.deletion.CASCADE, related_name='bom_items', to='part.Part', verbose_name='Part'),
        ),
        migrations.AlterField(
            model_name='bomitem',
            name='quantity',
            field=models.DecimalField(decimal_places=5, default=1.0, help_text='BOM quantity for this BOM item', max_digits=15, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity'),
        ),
        migrations.AlterField(
            model_name='bomitem',
            name='reference',
            field=models.CharField(blank=True, help_text='BOM item reference', max_length=500, verbose_name='Reference'),
        ),
        migrations.AlterField(
            model_name='bomitem',
            name='sub_part',
            field=models.ForeignKey(help_text='Select part to be used in BOM', limit_choices_to={'component': True}, on_delete=django.db.models.deletion.CASCADE, related_name='used_in', to='part.Part', verbose_name='Sub part'),
        ),
        migrations.AlterField(
            model_name='part',
            name='bom_checked_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='boms_checked', to=settings.AUTH_USER_MODEL, verbose_name='BOM checked by'),
        ),
        migrations.AlterField(
            model_name='part',
            name='bom_checked_date',
            field=models.DateField(blank=True, null=True, verbose_name='BOM checked date'),
        ),
        migrations.AlterField(
            model_name='part',
            name='bom_checksum',
            field=models.CharField(blank=True, help_text='Stored BOM checksum', max_length=128, verbose_name='BOM checksum'),
        ),
        migrations.AlterField(
            model_name='part',
            name='creation_date',
            field=models.DateField(auto_now_add=True, null=True, verbose_name='Creation Date'),
        ),
        migrations.AlterField(
            model_name='part',
            name='creation_user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='parts_created', to=settings.AUTH_USER_MODEL, verbose_name='Creation User'),
        ),
        migrations.AlterField(
            model_name='part',
            name='image',
            field=stdimage.models.StdImageField(blank=True, null=True, upload_to=part.models.rename_part_image, verbose_name='Image'),
        ),
        migrations.AlterField(
            model_name='part',
            name='responsible',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='parts_responible', to=settings.AUTH_USER_MODEL, verbose_name='Responsible'),
        ),
        migrations.AlterField(
            model_name='partattachment',
            name='attachment',
            field=models.FileField(help_text='Select file to attach', upload_to=InvenTree.models.rename_attachment, verbose_name='Attachment'),
        ),
        migrations.AlterField(
            model_name='partattachment',
            name='comment',
            field=models.CharField(blank=True, help_text='File comment', max_length=100, verbose_name='Comment'),
        ),
        migrations.AlterField(
            model_name='partattachment',
            name='part',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='part.Part', verbose_name='Part'),
        ),
        migrations.AlterField(
            model_name='partattachment',
            name='upload_date',
            field=models.DateField(auto_now_add=True, null=True, verbose_name='upload date'),
        ),
        migrations.AlterField(
            model_name='partattachment',
            name='user',
            field=models.ForeignKey(blank=True, help_text='User', null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='User'),
        ),
        migrations.AlterField(
            model_name='partcategory',
            name='default_keywords',
            field=models.CharField(blank=True, help_text='Default keywords for parts in this category', max_length=250, null=True, verbose_name='Default keywords'),
        ),
        migrations.AlterField(
            model_name='partcategory',
            name='default_location',
            field=mptt.fields.TreeForeignKey(blank=True, help_text='Default location for parts in this category', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='default_categories', to='stock.StockLocation', verbose_name='Default Location'),
        ),
        migrations.AlterField(
            model_name='partcategory',
            name='description',
            field=models.CharField(blank=True, help_text='Description (optional)', max_length=250, verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='partcategory',
            name='name',
            field=models.CharField(help_text='Name', max_length=100, validators=[InvenTree.validators.validate_tree_name], verbose_name='Name'),
        ),
        migrations.AlterField(
            model_name='partcategory',
            name='parent',
            field=mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='children', to='part.PartCategory', verbose_name='parent'),
        ),
        migrations.AlterField(
            model_name='partcategoryparametertemplate',
            name='category',
            field=models.ForeignKey(help_text='Part Category', on_delete=django.db.models.deletion.CASCADE, related_name='parameter_templates', to='part.PartCategory', verbose_name='Category'),
        ),
        migrations.AlterField(
            model_name='partcategoryparametertemplate',
            name='default_value',
            field=models.CharField(blank=True, help_text='Default Parameter Value', max_length=500, verbose_name='Default Value'),
        ),
        migrations.AlterField(
            model_name='partcategoryparametertemplate',
            name='parameter_template',
            field=models.ForeignKey(help_text='Parameter Template', on_delete=django.db.models.deletion.CASCADE, related_name='part_categories', to='part.PartParameterTemplate', verbose_name='Parameter Template'),
        ),
        migrations.AlterField(
            model_name='partparameter',
            name='data',
            field=models.CharField(help_text='Parameter Value', max_length=500, verbose_name='Data'),
        ),
        migrations.AlterField(
            model_name='partparameter',
            name='part',
            field=models.ForeignKey(help_text='Parent Part', on_delete=django.db.models.deletion.CASCADE, related_name='parameters', to='part.Part', verbose_name='Part'),
        ),
        migrations.AlterField(
            model_name='partparameter',
            name='template',
            field=models.ForeignKey(help_text='Parameter Template', on_delete=django.db.models.deletion.CASCADE, related_name='instances', to='part.PartParameterTemplate', verbose_name='Template'),
        ),
        migrations.AlterField(
            model_name='partparametertemplate',
            name='name',
            field=models.CharField(help_text='Parameter Name', max_length=100, unique=True, verbose_name='Name'),
        ),
        migrations.AlterField(
            model_name='partparametertemplate',
            name='units',
            field=models.CharField(blank=True, help_text='Parameter Units', max_length=25, verbose_name='Units'),
        ),
        migrations.AlterField(
            model_name='partrelated',
            name='part_1',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='related_parts_1', to='part.Part', verbose_name='Part 1'),
        ),
        migrations.AlterField(
            model_name='partrelated',
            name='part_2',
            field=models.ForeignKey(help_text='Select Related Part', on_delete=django.db.models.deletion.DO_NOTHING, related_name='related_parts_2', to='part.Part', verbose_name='Part 2'),
        ),
        migrations.AlterField(
            model_name='partsellpricebreak',
            name='part',
            field=models.ForeignKey(limit_choices_to={'salable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='salepricebreaks', to='part.Part', verbose_name='Part'),
        ),
        migrations.AlterField(
            model_name='partstar',
            name='part',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='starred_users', to='part.Part', verbose_name='Part'),
        ),
        migrations.AlterField(
            model_name='partstar',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='starred_parts', to=settings.AUTH_USER_MODEL, verbose_name='User'),
        ),
        migrations.AlterField(
            model_name='parttesttemplate',
            name='part',
            field=models.ForeignKey(limit_choices_to={'trackable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='test_templates', to='part.Part', verbose_name='Part'),
        ),
    ]
Esempio n. 7
0
class Migration(migrations.Migration):

    dependencies = [
        ('users', '0005_owner_model'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('stock', '0058_stockitem_packaging'),
    ]

    operations = [
        migrations.AlterField(
            model_name='stockitem',
            name='delete_on_deplete',
            field=models.BooleanField(
                default=True,
                help_text='Delete this Stock Item when stock is depleted',
                verbose_name='Delete on deplete'),
        ),
        migrations.AlterField(
            model_name='stockitem',
            name='owner',
            field=models.ForeignKey(
                blank=True,
                help_text='Select Owner',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='stock_items',
                to='users.Owner',
                verbose_name='Owner'),
        ),
        migrations.AlterField(
            model_name='stockitemattachment',
            name='attachment',
            field=models.FileField(
                help_text='Select file to attach',
                upload_to=InvenTree.models.rename_attachment,
                verbose_name='Attachment'),
        ),
        migrations.AlterField(
            model_name='stockitemattachment',
            name='comment',
            field=models.CharField(blank=True,
                                   help_text='File comment',
                                   max_length=100,
                                   verbose_name='Comment'),
        ),
        migrations.AlterField(
            model_name='stockitemattachment',
            name='upload_date',
            field=models.DateField(auto_now_add=True,
                                   null=True,
                                   verbose_name='upload date'),
        ),
        migrations.AlterField(
            model_name='stockitemattachment',
            name='user',
            field=models.ForeignKey(
                blank=True,
                help_text='User',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL,
                verbose_name='User'),
        ),
        migrations.AlterField(
            model_name='stockitemtracking',
            name='link',
            field=InvenTree.fields.InvenTreeURLField(
                blank=True,
                help_text='Link to external page for further information',
                verbose_name='Link'),
        ),
        migrations.AlterField(
            model_name='stockitemtracking',
            name='notes',
            field=models.CharField(blank=True,
                                   help_text='Entry notes',
                                   max_length=512,
                                   verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='stockitemtracking',
            name='quantity',
            field=models.DecimalField(
                decimal_places=5,
                default=1,
                max_digits=15,
                validators=[django.core.validators.MinValueValidator(0)],
                verbose_name='Quantity'),
        ),
        migrations.AlterField(
            model_name='stockitemtracking',
            name='title',
            field=models.CharField(help_text='Tracking entry title',
                                   max_length=250,
                                   verbose_name='Title'),
        ),
        migrations.AlterField(
            model_name='stocklocation',
            name='description',
            field=models.CharField(blank=True,
                                   help_text='Description (optional)',
                                   max_length=250,
                                   verbose_name='Description'),
        ),
        migrations.AlterField(
            model_name='stocklocation',
            name='name',
            field=models.CharField(
                help_text='Name',
                max_length=100,
                validators=[InvenTree.validators.validate_tree_name],
                verbose_name='Name'),
        ),
        migrations.AlterField(
            model_name='stocklocation',
            name='owner',
            field=models.ForeignKey(
                blank=True,
                help_text='Select Owner',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='stock_locations',
                to='users.Owner',
                verbose_name='Owner'),
        ),
        migrations.AlterField(
            model_name='stocklocation',
            name='parent',
            field=mptt.fields.TreeForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name='children',
                to='stock.StockLocation',
                verbose_name='parent'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('stock', '0058_stockitem_packaging'),
        ('users', '0005_owner_model'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('build', '0026_auto_20210216_1539'),
    ]

    operations = [
        migrations.AlterField(
            model_name='build',
            name='completed_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='builds_completed', to=settings.AUTH_USER_MODEL, verbose_name='completed by'),
        ),
        migrations.AlterField(
            model_name='build',
            name='completion_date',
            field=models.DateField(blank=True, null=True, verbose_name='Completion Date'),
        ),
        migrations.AlterField(
            model_name='build',
            name='creation_date',
            field=models.DateField(auto_now_add=True, verbose_name='Creation Date'),
        ),
        migrations.AlterField(
            model_name='build',
            name='issued_by',
            field=models.ForeignKey(blank=True, help_text='User who issued this build order', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='builds_issued', to=settings.AUTH_USER_MODEL, verbose_name='Issued by'),
        ),
        migrations.AlterField(
            model_name='build',
            name='responsible',
            field=models.ForeignKey(blank=True, help_text='User responsible for this build order', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='builds_responsible', to='users.Owner', verbose_name='Responsible'),
        ),
        migrations.AlterField(
            model_name='builditem',
            name='build',
            field=models.ForeignKey(help_text='Build to allocate parts', on_delete=django.db.models.deletion.CASCADE, related_name='allocated_stock', to='build.Build', verbose_name='Build'),
        ),
        migrations.AlterField(
            model_name='builditem',
            name='install_into',
            field=models.ForeignKey(blank=True, help_text='Destination stock item', limit_choices_to={'is_building': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='items_to_install', to='stock.StockItem', verbose_name='Install into'),
        ),
        migrations.AlterField(
            model_name='builditem',
            name='quantity',
            field=models.DecimalField(decimal_places=5, default=1, help_text='Stock quantity to allocate to build', max_digits=15, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity'),
        ),
        migrations.AlterField(
            model_name='builditem',
            name='stock_item',
            field=models.ForeignKey(help_text='Source stock item', limit_choices_to={'belongs_to': None, 'sales_order': None}, on_delete=django.db.models.deletion.CASCADE, related_name='allocations', to='stock.StockItem', verbose_name='Stock Item'),
        ),
        migrations.AlterField(
            model_name='buildorderattachment',
            name='attachment',
            field=models.FileField(help_text='Select file to attach', upload_to=InvenTree.models.rename_attachment, verbose_name='Attachment'),
        ),
        migrations.AlterField(
            model_name='buildorderattachment',
            name='comment',
            field=models.CharField(blank=True, help_text='File comment', max_length=100, verbose_name='Comment'),
        ),
        migrations.AlterField(
            model_name='buildorderattachment',
            name='upload_date',
            field=models.DateField(auto_now_add=True, null=True, verbose_name='upload date'),
        ),
        migrations.AlterField(
            model_name='buildorderattachment',
            name='user',
            field=models.ForeignKey(blank=True, help_text='User', null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='User'),
        ),
    ]