2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Feature/Tree picker (#5595)

* Show only the current modal over the backdrop, move others behind

* Added initial draft for tree picker

* Added filters to tree picker

* Added tree picker to more location fields

* Fixed bug with missing input group and filters side effect

* Added tree picker to part category inputs

* Added missing picker for part category parent input

* Fixed disabled items

* Fix js linting errors

* trigger: ci

* Bump api_version.py

* Update api_version.py
This commit is contained in:
Lukas
2023-10-04 15:11:49 +02:00
committed by GitHub
parent 3d8e3f1625
commit 9b4e1743c7
17 changed files with 281 additions and 60 deletions

View File

@ -775,6 +775,7 @@ class LocationTreeSerializer(InvenTree.serializers.InvenTreeModelSerializer):
'name',
'parent',
'icon',
'structural',
]

View File

@ -650,6 +650,10 @@ $("#stock-return-from-customer").click(function() {
{% if item.part.default_location %}
value: {{ item.part.default_location.pk }},
{% endif %}
tree_picker: {
url: '{% url "api-location-tree" %}',
default_icon: global_settings.STOCK_LOCATION_DEFAULT_ICON,
},
},
notes: {
icon: 'fa-sticky-note',

View File

@ -238,9 +238,18 @@
{% if stocktake_enable and roles.stocktake.add %}
$('#location-stocktake').click(function() {
generateStocktakeReport({
category: {},
category: {
tree_picker: {
url: '{% url "api-part-category-tree" %}',
default_icon: global_settings.PART_CATEGORY_DEFAULT_ICON,
},
},
location: {
{% if location %}value: {{ location.pk }},{% endif %}
tree_picker: {
url: '{% url "api-location-tree" %}',
default_icon: global_settings.STOCK_LOCATION_DEFAULT_ICON,
},
},
generate_report: {},
update_parts: {},