2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Adds an endpoint for calling the plugin code to "locate" something

This commit is contained in:
Oliver Walters
2022-05-09 23:42:28 +10:00
parent 9b7c26ec9c
commit 57f3efe758
5 changed files with 135 additions and 2 deletions

View File

@ -473,6 +473,8 @@ class LocateMixin:
Note: A custom implemenation could always change this behaviour
"""
logger.info(f"LocateMixin: Attempting to locate StockItem pk={item_pk}")
from stock.models import StockItem
try:
@ -482,6 +484,7 @@ class LocateMixin:
self.locate_stock_location(item.location.pk)
except StockItem.DoesNotExist:
logger.warning("LocateMixin: StockItem pk={item_pk} not found")
pass
def locate_stock_location(self, location_pk):