Build line assembly filter (#7874)

* Fix typo

* Add "assembly" filter to BuildLine API endpoint

- Add filter for table in PUI

* Bump API version
This commit is contained in:
Oliver 2024-08-14 16:34:22 +10:00 committed by GitHub
parent 697ab1653a
commit e1b0efaa12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 2 deletions

View File

@ -1,13 +1,16 @@
"""InvenTree API version information.""" """InvenTree API version information."""
# InvenTree API version # 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.""" """Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """ 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 v237 - 2024-08-13 : https://github.com/inventree/InvenTree/pull/7863
- Reimplement "bulk delete" operation for Attachment model - Reimplement "bulk delete" operation for Attachment model
- Fix permission checks for Attachment API endpoints - Fix permission checks for Attachment API endpoints

View File

@ -290,6 +290,7 @@ class BuildLineFilter(rest_filters.FilterSet):
# Fields on related models # Fields on related models
consumable = rest_filters.BooleanFilter(label=_('Consumable'), field_name='bom_item__consumable') consumable = rest_filters.BooleanFilter(label=_('Consumable'), field_name='bom_item__consumable')
optional = rest_filters.BooleanFilter(label=_('Optional'), field_name='bom_item__optional') 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') tracked = rest_filters.BooleanFilter(label=_('Tracked'), field_name='bom_item__sub_part__trackable')
allocated = rest_filters.BooleanFilter(label=_('Allocated'), method='filter_allocated') allocated = rest_filters.BooleanFilter(label=_('Allocated'), method='filter_allocated')

View File

@ -307,7 +307,7 @@ export function BomTable({
{ {
name: 'sub_part_assembly', name: 'sub_part_assembly',
label: t`Assembled Part`, label: t`Assembled Part`,
description: t`Show asssmbled items` description: t`Show assembled items`
}, },
{ {
name: 'available_stock', name: 'available_stock',

View File

@ -56,6 +56,11 @@ export default function BuildLineTable({
label: t`Optional`, label: t`Optional`,
description: t`Show optional lines` description: t`Show optional lines`
}, },
{
name: 'assembly',
label: t`Assembly`,
description: t`Show assembled items`
},
{ {
name: 'tracked', name: 'tracked',
label: t`Tracked`, label: t`Tracked`,