Remove unique_together requirement on SalesOrderAllocation model

This commit is contained in:
Oliver Walters 2022-05-17 00:36:30 +10:00
parent 263ac01727
commit 3373bb19f1
2 changed files with 17 additions and 6 deletions

View File

@ -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(),
),
]

View File

@ -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: