diff --git a/src/backend/InvenTree/InvenTree/api_version.py b/src/backend/InvenTree/InvenTree/api_version.py index a8ea357bfd..77c816cf99 100644 --- a/src/backend/InvenTree/InvenTree/api_version.py +++ b/src/backend/InvenTree/InvenTree/api_version.py @@ -1,13 +1,16 @@ """InvenTree API version information.""" # InvenTree API version -INVENTREE_API_VERSION = 237 +INVENTREE_API_VERSION = 238 """Increment this API version number whenever there is a significant change to the API that any clients need to know about.""" INVENTREE_API_TEXT = """ +v238 - 2024-08-14 : https://github.com/inventree/InvenTree/pull/7874 + - Add "assembly" filter to BuildLine API endpoint + v237 - 2024-08-13 : https://github.com/inventree/InvenTree/pull/7863 - Reimplement "bulk delete" operation for Attachment model - Fix permission checks for Attachment API endpoints diff --git a/src/backend/InvenTree/build/api.py b/src/backend/InvenTree/build/api.py index e84ffe4396..f1e4b4db9d 100644 --- a/src/backend/InvenTree/build/api.py +++ b/src/backend/InvenTree/build/api.py @@ -290,6 +290,7 @@ class BuildLineFilter(rest_filters.FilterSet): # Fields on related models consumable = rest_filters.BooleanFilter(label=_('Consumable'), field_name='bom_item__consumable') optional = rest_filters.BooleanFilter(label=_('Optional'), field_name='bom_item__optional') + assembly = rest_filters.BooleanFilter(label=_('Assembly'), field_name='bom_item__sub_part__assembly') tracked = rest_filters.BooleanFilter(label=_('Tracked'), field_name='bom_item__sub_part__trackable') allocated = rest_filters.BooleanFilter(label=_('Allocated'), method='filter_allocated') diff --git a/src/frontend/src/tables/bom/BomTable.tsx b/src/frontend/src/tables/bom/BomTable.tsx index a065c73aeb..c10c5db790 100644 --- a/src/frontend/src/tables/bom/BomTable.tsx +++ b/src/frontend/src/tables/bom/BomTable.tsx @@ -307,7 +307,7 @@ export function BomTable({ { name: 'sub_part_assembly', label: t`Assembled Part`, - description: t`Show asssmbled items` + description: t`Show assembled items` }, { name: 'available_stock', diff --git a/src/frontend/src/tables/build/BuildLineTable.tsx b/src/frontend/src/tables/build/BuildLineTable.tsx index f51e5d711a..7d5487efbe 100644 --- a/src/frontend/src/tables/build/BuildLineTable.tsx +++ b/src/frontend/src/tables/build/BuildLineTable.tsx @@ -56,6 +56,11 @@ export default function BuildLineTable({ label: t`Optional`, description: t`Show optional lines` }, + { + name: 'assembly', + label: t`Assembly`, + description: t`Show assembled items` + }, { name: 'tracked', label: t`Tracked`,