2
0
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:
Oliver Walters
2019-05-18 12:17:57 +10:00
parent 34d1ef7d8d
commit a95e77c429
2 changed files with 8 additions and 1 deletions

View File

@ -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 """