mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 21:45:39 +00:00
Pre-fill allocation count
This commit is contained in:
@ -14,6 +14,13 @@ def multiply(x, y, *args, **kwargs):
|
||||
return x * y
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def part_allocation_count(build, part, *args, **kwargs):
|
||||
""" Return the total number of <part> allocated to <build> """
|
||||
|
||||
return build.getAllocatedQuantity(part)
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def inventree_version(*args, **kwargs):
|
||||
""" Return InvenTree version string """
|
||||
|
Reference in New Issue
Block a user