mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 21:25:42 +00:00 
			
		
		
		
	Merge remote-tracking branch 'inventree/master' into partial-shipment
This commit is contained in:
		| @@ -40,8 +40,8 @@ | ||||
| <link rel="stylesheet" href="{% static 'bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.css' %}"> | ||||
| <link rel="stylesheet" href="{% static 'bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css' %}"> | ||||
| <link rel='stylesheet' href='{% static "treegrid/css/jquery.treegrid.css" %}'> | ||||
| <link rel="stylesheet" href="{% static 'fontawesome/css/brands.css' %}"> | ||||
| <link rel="stylesheet" href="{% static 'fontawesome/css/solid.css' %}"> | ||||
| <link rel="stylesheet" href="{% static 'fontawesome/css/brands.min.css' %}"> | ||||
| <link rel="stylesheet" href="{% static 'fontawesome/css/solid.min.css' %}"> | ||||
| <link rel="stylesheet" href="{% static 'select2/css/select2.css' %}"> | ||||
| <link rel="stylesheet" href="{% static 'select2/css/select2-bootstrap-5-theme.css' %}"> | ||||
| <link rel="stylesheet" href="{% static 'fullcalendar/main.css' %}"> | ||||
|   | ||||
| @@ -153,12 +153,7 @@ function partFields(options={}) { | ||||
|         delete fields['default_expiry']; | ||||
|     } | ||||
|  | ||||
|     // Additional fields when "creating" a new part | ||||
|     if (options.create) { | ||||
|  | ||||
|         // No supplier parts available yet | ||||
|         delete fields['default_supplier']; | ||||
|  | ||||
|     if (options.create || options.duplicate) { | ||||
|         if (global_settings.PART_CREATE_INITIAL) { | ||||
|  | ||||
|             fields.initial_stock = { | ||||
| @@ -187,6 +182,13 @@ function partFields(options={}) { | ||||
|                 group: 'create', | ||||
|             }; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // Additional fields when "creating" a new part | ||||
|     if (options.create) { | ||||
|  | ||||
|         // No supplier parts available yet | ||||
|         delete fields['default_supplier']; | ||||
|  | ||||
|         fields.copy_category_parameters = { | ||||
|             type: 'boolean', | ||||
| @@ -349,6 +351,10 @@ function duplicatePart(pk, options={}) { | ||||
|                 duplicate: pk, | ||||
|             }); | ||||
|  | ||||
|             if (fields.initial_stock_location) { | ||||
|                 fields.initial_stock_location.value = data.default_location; | ||||
|             } | ||||
|  | ||||
|             // Remove "default_supplier" field | ||||
|             delete fields['default_supplier']; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user