From 3373bb19f1f57ecbbd3b9e08ad5d3746f2897fad Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 17 May 2022 00:36:30 +1000 Subject: [PATCH] Remove unique_together requirement on SalesOrderAllocation model --- ...lter_salesorderallocation_unique_together.py | 17 +++++++++++++++++ InvenTree/order/models.py | 6 ------ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 InvenTree/order/migrations/0068_alter_salesorderallocation_unique_together.py diff --git a/InvenTree/order/migrations/0068_alter_salesorderallocation_unique_together.py b/InvenTree/order/migrations/0068_alter_salesorderallocation_unique_together.py new file mode 100644 index 0000000000..23915cf9d0 --- /dev/null +++ b/InvenTree/order/migrations/0068_alter_salesorderallocation_unique_together.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.13 on 2022-05-16 14:35 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('order', '0067_auto_20220516_1120'), + ] + + operations = [ + migrations.AlterUniqueTogether( + name='salesorderallocation', + unique_together=set(), + ), + ] diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index e918f0a30c..7460e81e56 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -1269,12 +1269,6 @@ class SalesOrderAllocation(models.Model): def get_api_url(): return reverse('api-so-allocation-list') - class Meta: - unique_together = [ - # Cannot allocate any given StockItem to the same line more than once - ('line', 'item'), - ] - def clean(self): """ Validate the SalesOrderAllocation object: