mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
f6baf5d2ae
- Accepts absolute or percentage numbers - Default = blank - Now with custom validator! (for limited time only, limit one per customer)
47 lines
1.9 KiB
Python
47 lines
1.9 KiB
Python
# Generated by Django 2.2 on 2019-05-14 14:12
|
|
|
|
import InvenTree.validators
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('part', '0024_partcategory_default_keywords'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
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]),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='bomitem',
|
|
name='note',
|
|
field=models.CharField(blank=True, help_text='BOM item notes', max_length=100),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='bomitem',
|
|
name='part',
|
|
field=models.ForeignKey(help_text='Select parent part', limit_choices_to={'active': True, 'buildable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='bom_items', to='part.Part'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='bomitem',
|
|
name='quantity',
|
|
field=models.PositiveIntegerField(default=1, help_text='BOM quantity for this BOM item', validators=[django.core.validators.MinValueValidator(0)]),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='bomitem',
|
|
name='sub_part',
|
|
field=models.ForeignKey(help_text='Select part to be used in BOM', limit_choices_to={'active': True, 'consumable': True}, on_delete=django.db.models.deletion.CASCADE, related_name='used_in', to='part.Part'),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='supplierpart',
|
|
name='URL',
|
|
field=models.URLField(blank=True, help_text='URL for external supplier part link'),
|
|
),
|
|
]
|