2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Ulugbek erkinov master (#5872)

* Remove stat context variables

* Revert "Remove stat context variables"

This reverts commit 0989c308d0.

* Allow longer timeout for image download tests

* fix: Adding specific quantity of a part as installed item(s

* fix: Adding specific quantity of a part as installed item(s

* Update serializers.py

* Mark field as not required

* If value not provided, revert to "default" behavior

* Fix serializer validation

* Update frontend forms to mach

* Bump API version

---------

Co-authored-by: Ulugbek Erkinov <ulugbekerkinov606@gmail.com>
This commit is contained in:
Oliver
2023-11-06 22:58:46 +11:00
committed by GitHub
parent 390906532e
commit 63edd39e2d
3 changed files with 43 additions and 4 deletions

View File

@ -3217,6 +3217,12 @@ function installStockItem(stock_item_id, part_id, options={}) {
in_stock: true,
tracked: true,
},
onSelect: function(data, field, opts) {
// Adjust the 'quantity' field
if ('quantity' in data) {
updateFieldValue('quantity', data.quantity, opts);
}
},
adjustFilters: function(filters, opts) {
var part = getFormFieldValue('part', {}, opts);
@ -3226,7 +3232,8 @@ function installStockItem(stock_item_id, part_id, options={}) {
return filters;
}
}
},
quantity: {},
},
confirm: true,
title: '{% trans "Install Stock Item" %}',