Remove restriction on manual stock item installation (#4747)

- Allow stock item to be manually inside an item which is iteself installed in an item
- No practical reason for this limitation to exist
This commit is contained in:
Oliver 2023-05-02 14:46:54 +10:00 committed by GitHub
parent d9864fce69
commit 149c4df231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1171,10 +1171,6 @@ class StockItem(InvenTreeBarcodeMixin, InvenTreeNotesMixin, MetadataMixin, commo
user: The user performing the operation
notes: Any notes associated with the operation
"""
# Cannot be already installed in another stock item!
if self.belongs_to is not None:
return False
# If the quantity is less than the stock item, split the stock!
stock_item = other_item.splitStock(quantity, None, user)