InvenTree/InvenTree/part/migrations/0049_partsellpricebreak.py
2020-09-17 23:22:37 +10:00

31 lines
1.3 KiB
Python

# Generated by Django 3.0.7 on 2020-09-17 13:22
import InvenTree.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('common', '0007_colortheme'),
('part', '0048_auto_20200902_1404'),
]
operations = [
migrations.CreateModel(
name='PartSellPriceBreak',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('quantity', InvenTree.fields.RoundingDecimalField(decimal_places=5, default=1, max_digits=15, validators=[django.core.validators.MinValueValidator(1)])),
('cost', InvenTree.fields.RoundingDecimalField(decimal_places=5, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])),
('currency', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='common.Currency')),
('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='salepricebreaks', to='part.Part')),
],
options={
'unique_together': {('part', 'quantity')},
},
),
]