mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
after_save_stock_item (#8546)
This pull request addresses the issue discussed in #8452
This commit is contained in:
parent
809a978f7d
commit
ee9980e481
@ -2420,7 +2420,7 @@ def after_save_stock_item(sender, instance: StockItem, created, **kwargs):
|
|||||||
"""Hook function to be executed after StockItem object is saved/updated."""
|
"""Hook function to be executed after StockItem object is saved/updated."""
|
||||||
from part import tasks as part_tasks
|
from part import tasks as part_tasks
|
||||||
|
|
||||||
if created and not InvenTree.ready.isImportingData():
|
if not InvenTree.ready.isImportingData():
|
||||||
if InvenTree.ready.canAppAccessDatabase(allow_test=True):
|
if InvenTree.ready.canAppAccessDatabase(allow_test=True):
|
||||||
InvenTree.tasks.offload_task(
|
InvenTree.tasks.offload_task(
|
||||||
part_tasks.notify_low_stock_if_required,
|
part_tasks.notify_low_stock_if_required,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user