mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 18:25:26 +00:00
Stock transfer extra (#420)
* Add API version check * Support "packaging" and "status" fields when performing a stock-transfer action * Update release notes
This commit is contained in:
@ -451,6 +451,16 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
"location": {
|
||||
"value": widget.item.locationId,
|
||||
},
|
||||
"status": {
|
||||
"parent": "items",
|
||||
"nested": true,
|
||||
"value": widget.item.status,
|
||||
},
|
||||
"packaging": {
|
||||
"parent": "items",
|
||||
"nested": true,
|
||||
"value": widget.item.packaging,
|
||||
},
|
||||
"notes": {},
|
||||
};
|
||||
|
||||
@ -459,6 +469,12 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
|
||||
fields["quantity"]["hidden"] = true;
|
||||
}
|
||||
|
||||
// Old API does not support these fields
|
||||
if (!api.supportsStockAdjustExtraFields) {
|
||||
fields.remove("packaging");
|
||||
fields.remove("status");
|
||||
}
|
||||
|
||||
launchApiForm(
|
||||
context,
|
||||
L10().transferStock,
|
||||
|
Reference in New Issue
Block a user