Clear allocations when returning a stock item against a return order (#4538)

This commit is contained in:
Oliver 2023-03-29 16:04:31 +11:00 committed by GitHub
parent 66b8fb6bc1
commit 8148067f59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1745,6 +1745,9 @@ class ReturnOrder(TotalPriceMixin, Order):
stock_item = line.item stock_item = line.item
# Remove any allocations against the returned StockItem
stock_item.clearAllocations()
deltas = { deltas = {
'status': StockStatus.QUARANTINED, 'status': StockStatus.QUARANTINED,
'returnorder': self.pk, 'returnorder': self.pk,