[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:
Oliver
2026-02-10 21:54:35 +11:00
committed by GitHub
co-authored by Matthias Mair
parent 613ed40843
commit 1c1933b694
29 changed files with 669 additions and 208 deletions
+6 -1
View File
@@ -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