mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 10:05:39 +00:00
Added description as list for StockLocation
This commit is contained in:
@ -6,3 +6,4 @@ workers = multiprocessing.cpu_count() * 2 + 1
|
||||
|
||||
max_requests = 1000
|
||||
max_requests_jitter = 50
|
||||
timeout = 180
|
||||
|
@ -115,6 +115,13 @@ class StockLocation(InvenTreeTree):
|
||||
"""
|
||||
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')
|
||||
def before_delete_stock_location(sender, instance, using, **kwargs):
|
||||
|
Reference in New Issue
Block a user