From 022c48f2d346580a24833b24ec52ccf04f1c3778 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 13 Oct 2025 09:47:42 +1100 Subject: [PATCH] [API] Allow search of assembly fields in BOM API endpoint (#10561) * [API] Allow search of assembly fields in BOM API endpoint - Required so we can search the "used in" table * Bump API version --- src/backend/InvenTree/InvenTree/api_version.py | 5 ++++- src/backend/InvenTree/part/api.py | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/backend/InvenTree/InvenTree/api_version.py b/src/backend/InvenTree/InvenTree/api_version.py index 9d9cf990ca..9e059dfe7b 100644 --- a/src/backend/InvenTree/InvenTree/api_version.py +++ b/src/backend/InvenTree/InvenTree/api_version.py @@ -1,12 +1,15 @@ """InvenTree API version information.""" # InvenTree API version -INVENTREE_API_VERSION = 407 +INVENTREE_API_VERSION = 408 """Increment this API version number whenever there is a significant change to the API that any clients need to know about.""" INVENTREE_API_TEXT = """ +v408 -> 2025-10-13: https://github.com/inventree/InvenTree/pull/10561 + - Allow search of assembly fields in BOM API endpoint + v407 -> 2025-10-09: https://github.com/inventree/InvenTree/pull/10538 - Breaking: Set error status code for plugin action call instead of just returning error data diff --git a/src/backend/InvenTree/part/api.py b/src/backend/InvenTree/part/api.py index 5c2af9911b..9f66d47796 100644 --- a/src/backend/InvenTree/part/api.py +++ b/src/backend/InvenTree/part/api.py @@ -1639,6 +1639,11 @@ class BomList( search_fields = [ 'reference', + 'part__name', + 'part__description', + 'part__IPN', + 'part__revision', + 'part__keywords', 'sub_part__name', 'sub_part__description', 'sub_part__IPN',