mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-19 14:37:48 +00:00
Refactor add_tracking_entry
This commit is contained in:
1 parent
385131137f
commit
0020e85397
2 files changed
+39
-37
No files matched your search
@@ -370,19 +370,17 @@ class PurchaseOrder(Order):
|
||||
|
||||
tracking_info = {
|
||||
'status': status,
|
||||
'purchaseorder': self.pk,
|
||||
'quantity': quantity,
|
||||
}
|
||||
|
||||
if location:
|
||||
tracking_info['location'] = location.pk
|
||||
|
||||
stock.add_tracking_entry(
|
||||
StockHistoryCode.RECEIVED_AGAINST_PURCHASE_ORDER,
|
||||
user,
|
||||
notes=notes,
|
||||
url=self.get_absolute_url(),
|
||||
deltas=tracking_info
|
||||
deltas=tracking_info,
|
||||
location=location,
|
||||
purchaseorder=self,
|
||||
quantity=quantity
|
||||
)
|
||||
|
||||
# Update the number of parts received against the particular line item
|
||||
|
||||
Reference in new issue
Block a user