mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
Implemented API to move multiple items at once
- Added ability to override request method in inventreeUpdate - Added inventree/script/stock.js to handle stock API js - Added StockMove API endpoint
This commit is contained in:
@ -192,6 +192,23 @@ class StockItem(models.Model):
|
||||
|
||||
track.save()
|
||||
|
||||
@transaction.atomic
|
||||
def move(self, location, user):
|
||||
|
||||
if location == self.location:
|
||||
return
|
||||
|
||||
note = "Moved to {loc}".format(loc=location.name)
|
||||
|
||||
self.location = location
|
||||
self.save()
|
||||
|
||||
self.add_transaction_note('Transfer',
|
||||
user,
|
||||
notes=note,
|
||||
system=True)
|
||||
|
||||
|
||||
@transaction.atomic
|
||||
def stocktake(self, count, user):
|
||||
""" Perform item stocktake.
|
||||
|
Reference in New Issue
Block a user