Add another check for merging stock

This commit is contained in:
Oliver committed 2021-12-21 09:29:12 +11:00
1 parent dd53748f9f
commit 52ca2e5068
2 files changed
+5 -2

No files matched your search

+3
View File
@@ -1166,6 +1166,9 @@ class StockItem(MPTTModel):
if self.belongs_to:
raise ValidationError(_('Stock item is installed in another item'))
if self.installed_item_count() > 0:
raise ValidationError(_('Stock item contains other items'))
if self.customer:
raise ValidationError(_('Stock item has been assigned to a customer'))