mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
parent
2d4cc91701
commit
752b70c1f7
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.12 on 2022-03-14 22:19
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('company', '0041_alter_company_options'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='supplierpricebreak',
|
||||
name='updated',
|
||||
field=models.DateTimeField(auto_now=True, null=True, verbose_name='last updated'),
|
||||
),
|
||||
]
|
@ -686,7 +686,7 @@ class SupplierPart(models.Model):
|
||||
return s
|
||||
|
||||
|
||||
class SupplierPriceBreak(common.models.PriceBreak):
|
||||
class SupplierPriceBreak(common.models.PriceBreak):
|
||||
""" Represents a quantity price break for a SupplierPart.
|
||||
- Suppliers can offer discounts at larger quantities
|
||||
- SupplierPart(s) may have zero-or-more associated SupplierPriceBreak(s)
|
||||
@ -704,6 +704,8 @@ class SupplierPriceBreak(common.models.PriceBreak):
|
||||
|
||||
part = models.ForeignKey(SupplierPart, on_delete=models.CASCADE, related_name='pricebreaks', verbose_name=_('Part'),)
|
||||
|
||||
updated = models.DateTimeField(auto_now=True, null=True, verbose_name=_('last updated'))
|
||||
|
||||
class Meta:
|
||||
unique_together = ("part", "quantity")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user