mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-29 20:40:35 +00:00 
			
		
		
		
	Bug fix for stock item creation form
This commit is contained in:
		| @@ -1,6 +1,11 @@ | ||||
| ## InvenTree App Release Notes | ||||
| --- | ||||
|  | ||||
| ### 0.5.5 - January 2022 | ||||
| --- | ||||
|  | ||||
| - Fixes bug in stock item creation form | ||||
|  | ||||
| ### 0.5.4 - January 2022 | ||||
| --- | ||||
|  | ||||
|   | ||||
| @@ -873,8 +873,15 @@ Future<void> launchApiForm( | ||||
|     } | ||||
|  | ||||
|     // Add instance value to the field | ||||
|     field.data["instance_value"] = modelData[fieldName]; | ||||
|     dynamic model_value = modelData[fieldName]; | ||||
|  | ||||
|     if (model_value != null) { | ||||
|       field.data["instance_value"] = model_value; | ||||
|  | ||||
|       if (field.data["value"] == null) { | ||||
|         field.data["value"] = model_value; | ||||
|       } | ||||
|     } | ||||
|     formFields.add(field); | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -59,7 +59,8 @@ class _PaginatedPartListState extends PaginatedSearchState<PaginatedPartList> { | ||||
|  | ||||
|   @override | ||||
|   Future<InvenTreePageResponse?> requestPage(int limit, int offset, Map<String, String> params) async { | ||||
|     final bool cascade = await InvenTreeSettingsManager().getBool("partSubcategory", true); | ||||
|  | ||||
|     final bool cascade = await InvenTreeSettingsManager().getBool(INV_PART_SUBCATEGORY, true); | ||||
|  | ||||
|     params["cascade"] = "${cascade}"; | ||||
|  | ||||
|   | ||||
| @@ -57,7 +57,7 @@ class _PaginatedStockItemListState extends PaginatedSearchState<PaginatedStockIt | ||||
|   Future<InvenTreePageResponse?> requestPage(int limit, int offset, Map<String, String> params) async { | ||||
|  | ||||
|     // Do we include stock items from sub-locations? | ||||
|     final bool cascade = await InvenTreeSettingsManager().getBool("stockSublocation", true); | ||||
|     final bool cascade = await InvenTreeSettingsManager().getBool(INV_STOCK_SUBLOCATION, true); | ||||
|  | ||||
|     params["cascade"] = "${cascade}"; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user