Coverage for src/backend/InvenTree/part/migrations/0049_partsellpricebreak.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 17:47 +0000

1# Generated by Django 3.0.7 on 2020-09-17 13:22 

2 

3import InvenTree.fields 

4import django.core.validators 

5from django.db import migrations, models 

6import django.db.models.deletion 

7 

8 

9class Migration(migrations.Migration): 

10 

11 dependencies = [ 

12 ('common', '0007_colortheme'), 

13 ('part', '0048_auto_20200902_1404'), 

14 ] 

15 

16 operations = [ 

17 migrations.CreateModel( 

18 name='PartSellPriceBreak', 

19 fields=[ 

20 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

21 ('quantity', InvenTree.fields.RoundingDecimalField(decimal_places=5, default=1, max_digits=15, validators=[django.core.validators.MinValueValidator(1)])), 

22 ('cost', InvenTree.fields.RoundingDecimalField(decimal_places=5, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])), 

23 ('currency', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='common.Currency')), 

24 ('part', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='salepricebreaks', to='part.Part')), 

25 ], 

26 options={ 

27 'verbose_name': 'Part Sale Price Break', 

28 'unique_together': {('part', 'quantity')}, 

29 }, 

30 ), 

31 ]