2
0
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:
Oliver
2018-05-06 21:39:33 +10:00
parent 87f96d6b3c
commit d8922aa9db
6 changed files with 162 additions and 4 deletions

View File

@ -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.