mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixes
This commit is contained in:
parent
68b53acbf1
commit
30ff48d803
@ -389,7 +389,8 @@ class StockList(generics.ListCreateAPIView):
|
|||||||
serializer = self.get_serializer(data=request.data)
|
serializer = self.get_serializer(data=request.data)
|
||||||
serializer.is_valid(raise_exception=True)
|
serializer.is_valid(raise_exception=True)
|
||||||
|
|
||||||
item = serializer.save(user=user)
|
# TODO - Save the user who created this item
|
||||||
|
item = serializer.save()
|
||||||
|
|
||||||
# A location was *not* specified - try to infer it
|
# A location was *not* specified - try to infer it
|
||||||
if 'location' not in request.data:
|
if 'location' not in request.data:
|
||||||
|
@ -981,7 +981,6 @@ class StockItem(MPTTModel):
|
|||||||
date=datetime.now(),
|
date=datetime.now(),
|
||||||
notes=notes,
|
notes=notes,
|
||||||
deltas=deltas,
|
deltas=deltas,
|
||||||
system=True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
entry.save()
|
entry.save()
|
||||||
@ -1048,7 +1047,7 @@ class StockItem(MPTTModel):
|
|||||||
new_item.location = location
|
new_item.location = location
|
||||||
|
|
||||||
# The item already has a transaction history, don't create a new note
|
# The item already has a transaction history, don't create a new note
|
||||||
new_item.save(user=user, note=False)
|
new_item.save(user=user, notes=notes)
|
||||||
|
|
||||||
# Copy entire transaction history
|
# Copy entire transaction history
|
||||||
new_item.copyHistoryFrom(self)
|
new_item.copyHistoryFrom(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user