mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-01 17:51:23 +00:00
[enhancements] Stock tracking enhancements (#11260)
* Data migrations for StockItemTracking - Propagate the 'part' links * Enable filtering of stock tracking entries by part * Enable filtering by date range * Display stock tracking for part * Table enhancements * Bump API version * Display stock item column * Ensure 'quantity' is recorded for stock tracking entries * Add new global settings * Adds background task for deleting old stock tracking entries * Docs updates * Enhanced docs * Cast quantity to float * Rever data migration * Ensure part link gets created * Improved prefetch for API * Playwright testing * Tweak unit test thresholds --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
@@ -2915,7 +2915,12 @@ class ReturnOrder(TotalPriceMixin, Order):
|
||||
if status is None:
|
||||
status = StockStatus.QUARANTINED.value
|
||||
|
||||
deltas = {'status': status, 'returnorder': self.pk, 'location': location.pk}
|
||||
deltas = {
|
||||
'status': status,
|
||||
'returnorder': self.pk,
|
||||
'location': location.pk,
|
||||
'quantity': float(line.quantity),
|
||||
}
|
||||
|
||||
if stock_item.customer:
|
||||
deltas['customer'] = stock_item.customer.pk
|
||||
|
||||
Reference in New Issue
Block a user