2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-16 17:28:11 +00:00

[UI] Order form improvements (#10802)

* Auto-fill supplier parts in order wizard

* Copy supplier part SKU from order parts wizard

* Add "on_order" filter to BuildLine table

* Allow ordering by production and ordering quantities

* Allow specification of purchase price

* Bump API version

* Adjust UI testings
This commit is contained in:
Oliver
2025-11-11 17:29:18 +11:00
committed by GitHub
parent f3c1cc12af
commit d829d3a548
7 changed files with 54 additions and 7 deletions

View File

@@ -1,12 +1,16 @@
"""InvenTree API version information."""
# InvenTree API version
INVENTREE_API_VERSION = 424
INVENTREE_API_VERSION = 425
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """
v424 -> 2025-11-05 : https://github.com/inventree/InvenTree/pull/10730
v425 -> 2025-11-11 : https://github.com/inventree/InvenTree/pull/10802
- Adds "on_order" filter to the BuildLine API endpoint
- Allow BuildLine list to be ordered by "on_order" and "in_production" fields
v424 -> 2025-11-11 : https://github.com/inventree/InvenTree/pull/10730
- Adds more lower / upper bounds to integer fields in the API schema due to bump to Django 5.2- no functional changes
v423 -> 2025-11-05 : https://github.com/inventree/InvenTree/pull/10772

View File

@@ -520,6 +520,15 @@ class BuildLineFilter(FilterSet):
return queryset.filter(flt)
return queryset.exclude(flt)
on_order = rest_filters.BooleanFilter(label=_('On Order'), method='filter_on_order')
def filter_on_order(self, queryset, name, value):
"""Filter by whether there is stock on order for each BuildLine."""
if str2bool(value):
return queryset.filter(on_order__gt=0)
else:
return queryset.filter(on_order=0)
class BuildLineMixin(SerializerContextMixin):
"""Mixin class for BuildLine API endpoints."""
@@ -606,6 +615,8 @@ class BuildLineList(
'trackable',
'allow_variants',
'inherited',
'on_order',
'scheduled_to_build',
]
ordering_field_aliases = {