mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added description as list for StockLocation
This commit is contained in:
parent
1dbdcb6d9c
commit
f5178e9fc3
@ -6,3 +6,4 @@ workers = multiprocessing.cpu_count() * 2 + 1
|
|||||||
|
|
||||||
max_requests = 1000
|
max_requests = 1000
|
||||||
max_requests_jitter = 50
|
max_requests_jitter = 50
|
||||||
|
timeout = 180
|
||||||
|
@ -115,6 +115,13 @@ class StockLocation(InvenTreeTree):
|
|||||||
"""
|
"""
|
||||||
return self.stock_item_count()
|
return self.stock_item_count()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def description_as_list(self):
|
||||||
|
""" Simply returns the number of stock items in this location.
|
||||||
|
Required for tree view serializer.
|
||||||
|
"""
|
||||||
|
return self.description.split("-")
|
||||||
|
|
||||||
|
|
||||||
@receiver(pre_delete, sender=StockLocation, dispatch_uid='stocklocation_delete_log')
|
@receiver(pre_delete, sender=StockLocation, dispatch_uid='stocklocation_delete_log')
|
||||||
def before_delete_stock_location(sender, instance, using, **kwargs):
|
def before_delete_stock_location(sender, instance, using, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user