mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix user recording when serializing stock
This commit is contained in:
parent
41c07fc423
commit
7c1615a2b6
@ -131,6 +131,8 @@ class StockItem(models.Model):
|
||||
|
||||
user = kwargs.pop('user', None)
|
||||
|
||||
add_note = add_note and kwargs.pop('note', True)
|
||||
|
||||
super(StockItem, self).save(*args, **kwargs)
|
||||
|
||||
if add_note:
|
||||
@ -468,7 +470,8 @@ class StockItem(models.Model):
|
||||
if location:
|
||||
new_item.location = location
|
||||
|
||||
new_item.save()
|
||||
# The item already has a transaction history, don't create a new note
|
||||
new_item.save(user=user, note=False)
|
||||
|
||||
# Copy entire transaction history
|
||||
new_item.copyHistoryFrom(self)
|
||||
|
Loading…
Reference in New Issue
Block a user