From 9f8ee5a095b961b8dbd7343e16431e09cde4837c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 Dec 2023 10:45:57 +0400 Subject: [PATCH] Fix to clear SO Allocations on receipt of Return Order Line Item (#6117) (#6124) * Added stock_item.clearAllocations() to order.models.py * Update models.py ReturnOrder clear allocations on line receipt (cherry picked from commit fc5645a9a541688a6b33094d704792a725674a16) Co-authored-by: mcollins-DL <71047397+mcollins-DL@users.noreply.github.com> --- InvenTree/order/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index d061d49520..20f7432fab 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -1926,6 +1926,7 @@ class ReturnOrder(TotalPriceMixin, Order): stock_item.customer = None stock_item.sales_order = None stock_item.save(add_note=False) + stock_item.clearAllocations() # Add a tracking entry to the StockItem stock_item.add_tracking_entry(