From ef9c6e9fe01b95034e2fde99906028bfb4f8d4ab Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 25 Feb 2022 15:56:40 +1100 Subject: [PATCH] Bug fix --- InvenTree/stock/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 45f3a40a4d..eaae691641 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -31,7 +31,6 @@ from datetime import datetime, timedelta from InvenTree import helpers import InvenTree.tasks -import common.models import report.models import label.models @@ -1311,6 +1310,7 @@ class StockItem(MPTTModel): """ notes = kwargs.get('notes', '') + code = kwargs.get('code', StockHistoryCode.SPLIT_FROM_PARENT) # Do not split a serialized part if self.serialized: @@ -1352,7 +1352,7 @@ class StockItem(MPTTModel): # Add a new tracking item for the new stock item new_stock.add_tracking_entry( - StockHistoryCode.SPLIT_FROM_PARENT, + code, user, notes=notes, deltas={