2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

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>
This commit is contained in:
github-actions[bot] 2023-12-21 10:45:57 +04:00 committed by GitHub
parent 79fdf9243b
commit 9f8ee5a095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1926,6 +1926,7 @@ class ReturnOrder(TotalPriceMixin, Order):
stock_item.customer = None stock_item.customer = None
stock_item.sales_order = None stock_item.sales_order = None
stock_item.save(add_note=False) stock_item.save(add_note=False)
stock_item.clearAllocations()
# Add a tracking entry to the StockItem # Add a tracking entry to the StockItem
stock_item.add_tracking_entry( stock_item.add_tracking_entry(