2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Parts now know how many builds they are allocated to

- allocated_builds returns lists of active builds this part is allocated to
- allocated_build_count returns the total number of this part allocated to builds
- allocation_count returns total number of allocated parts (in the future this will also include those parts allocated to customer orders)
This commit is contained in:
Oliver
2018-04-17 22:26:57 +10:00
parent 0b40197cd2
commit 11b9fb10d8
8 changed files with 123 additions and 28 deletions

View File

@ -44,6 +44,7 @@ part_detail_urls = [
url(r'^build/?', views.PartDetail.as_view(template_name='part/build.html'), name='part-build'),
url(r'^stock/?', views.PartDetail.as_view(template_name='part/stock.html'), name='part-stock'),
url(r'^used/?', views.PartDetail.as_view(template_name='part/used_in.html'), name='part-used-in'),
url(r'^allocation/?', views.PartDetail.as_view(template_name='part/allocation.html'), name='part-allocation'),
url(r'^suppliers/?', views.PartDetail.as_view(template_name='part/supplier.html'), name='part-suppliers'),
# Any other URLs go to the part detail page