2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-28 14:25:56 +00:00

Fixes for unit tests

This commit is contained in:
Oliver Walters
2021-01-29 12:47:46 +11:00
parent 4ef6a6dc62
commit 8fda2cf745
3 changed files with 11 additions and 6 deletions

View File

@@ -1005,11 +1005,15 @@ class StockItem(MPTTModel):
new_stock.addTransactionNote(
_("Split from existing stock"),
user,
_("Split") + f" {helpers.normalize(quantity)} " + _("items")
f"{_('Split')} {helpers.normalize(quantity)} {_('items')}"
)
# Remove the specified quantity from THIS stock item
self.take_stock(quantity, user, 'Split {n} items into new stock item'.format(n=quantity))
self.take_stock(
quantity,
user,
f"{_('Split')} {quantity} {_('items into new stock item')}"
)
# Return a copy of the "new" stock item
return new_stock