mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
make imports on function level
This commit is contained in:
parent
18a263ff75
commit
cce3d3a35d
@ -39,7 +39,6 @@ from plugin.events import trigger_event
|
|||||||
from part import models as PartModels
|
from part import models as PartModels
|
||||||
from stock import models as StockModels
|
from stock import models as StockModels
|
||||||
from users import models as UserModels
|
from users import models as UserModels
|
||||||
from . import tasks as build_tasks
|
|
||||||
|
|
||||||
|
|
||||||
def get_next_build_number():
|
def get_next_build_number():
|
||||||
@ -1140,6 +1139,7 @@ def after_save_build(sender, instance: Build, created: bool, **kwargs):
|
|||||||
"""
|
"""
|
||||||
Callback function to be executed after a Build instance is saved
|
Callback function to be executed after a Build instance is saved
|
||||||
"""
|
"""
|
||||||
|
from . import tasks as build_tasks
|
||||||
|
|
||||||
if created:
|
if created:
|
||||||
# A new Build has just been created
|
# A new Build has just been created
|
||||||
|
@ -46,7 +46,6 @@ from users.models import Owner
|
|||||||
|
|
||||||
from company import models as CompanyModels
|
from company import models as CompanyModels
|
||||||
from part import models as PartModels
|
from part import models as PartModels
|
||||||
from part import tasks as part_tasks
|
|
||||||
|
|
||||||
|
|
||||||
class StockLocation(MetadataMixin, InvenTreeTree):
|
class StockLocation(MetadataMixin, InvenTreeTree):
|
||||||
@ -2021,6 +2020,7 @@ def after_delete_stock_item(sender, instance: StockItem, **kwargs):
|
|||||||
"""
|
"""
|
||||||
Function to be executed after a StockItem object is deleted
|
Function to be executed after a StockItem object is deleted
|
||||||
"""
|
"""
|
||||||
|
from part import tasks as part_tasks
|
||||||
|
|
||||||
if not InvenTree.ready.isImportingData():
|
if not InvenTree.ready.isImportingData():
|
||||||
# Run this check in the background
|
# Run this check in the background
|
||||||
@ -2032,6 +2032,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
|
||||||
|
|
||||||
if not InvenTree.ready.isImportingData():
|
if not InvenTree.ready.isImportingData():
|
||||||
# Run this check in the background
|
# Run this check in the background
|
||||||
|
Loading…
x
Reference in New Issue
Block a user