2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-18 16:41:32 +00:00

Add ability to create new stock tracking note for a stock item

This commit is contained in:
Oliver Walters
2019-07-16 00:10:24 +10:00
parent 310d4b5f07
commit bb799d98be
7 changed files with 101 additions and 13 deletions

View File

@@ -298,7 +298,7 @@ class StockItem(models.Model):
def has_tracking_info(self):
return self.tracking_info.count() > 0
def addTransactionNote(self, title, user, notes='', system=True):
def addTransactionNote(self, title, user, notes='', url='', system=True):
""" Generation a stock transaction note for this item.
Brief automated note detailing a movement or quantity change.
@@ -310,6 +310,7 @@ class StockItem(models.Model):
quantity=self.quantity,
date=datetime.now().date(),
notes=notes,
URL=url,
system=system
)