mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 04:35:42 +00:00 
			
		
		
		
	Add "owner" field
This commit is contained in:
		| @@ -58,15 +58,15 @@ class StockItemSerializerBrief(InvenTreeModelSerializer): | ||||
|     class Meta: | ||||
|         model = StockItem | ||||
|         fields = [ | ||||
|             'pk', | ||||
|             'uid', | ||||
|             'part', | ||||
|             'part_name', | ||||
|             'supplier_part', | ||||
|             'pk', | ||||
|             'location', | ||||
|             'location_name', | ||||
|             'quantity', | ||||
|             'serial', | ||||
|             'supplier_part', | ||||
|             'uid', | ||||
|         ] | ||||
|  | ||||
|  | ||||
| @@ -208,6 +208,7 @@ class StockItemSerializer(InvenTreeModelSerializer): | ||||
|             'location', | ||||
|             'location_detail', | ||||
|             'notes', | ||||
|             'owner', | ||||
|             'packaging', | ||||
|             'part', | ||||
|             'part_detail', | ||||
|   | ||||
| @@ -94,8 +94,8 @@ function stockItemFields(options={}) { | ||||
|         purchase_price_currency: {}, | ||||
|         packaging: {}, | ||||
|         link: {}, | ||||
|         owner: {}, | ||||
|         delete_on_deplete: {}, | ||||
|         // owner: {}, | ||||
|     }; | ||||
|  | ||||
|     // Remove stock expiry fields if feature is not enabled | ||||
| @@ -103,6 +103,11 @@ function stockItemFields(options={}) { | ||||
|         delete fields['expiry_date']; | ||||
|     } | ||||
|  | ||||
|     // Remove ownership field if feature is not enanbled | ||||
|     if (!global_settings.STOCK_OWNERSHIP_CONTROL) { | ||||
|         delete fields['owner']; | ||||
|     } | ||||
|  | ||||
|     return fields; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user