mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Virtual part fix (#3265)
* Add 'virtual': False requirement to sales order items * Adds "virtual" filter for part table * Adds extra validation to the SalesOrderLineItem model * Prevent creation of stock items for virtual parts - Add validation check to clean() method of StockItem model - Improve validation message for StockItemSerializer class * Hide "new stock item" button for virtual parts * Hide more buttons for 'virtual' parts
This commit is contained in:
		| @@ -14,7 +14,7 @@ | ||||
|             <h4>{% trans "Supplier Parts" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% if roles.purchase_order.add %} | ||||
|                 {% if roles.purchase_order.add and not part.virtual %} | ||||
|                     <button class="btn btn-success" id='supplier-part-create' title='{% trans "Create new supplier part" %}'> | ||||
|                         <span class='fas fa-plus-circle'></span> {% trans "New Supplier Part" %} | ||||
|                     </button> | ||||
| @@ -61,7 +61,7 @@ | ||||
|             <h4>{% trans "Manufacturer Parts" %}</h4> | ||||
|             {% include "spacer.html" %} | ||||
|             <div class='btn-group' role='group'> | ||||
|                 {% if roles.purchase_order.add %} | ||||
|                 {% if roles.purchase_order.add and not part.virtual %} | ||||
|                     <button type="button" class="btn btn-success" id='manufacturer-part-create' title='{% trans "Create new manufacturer part" %}'> | ||||
|                         <span class='fas fa-plus-circle'></span> {% trans "New Manufacturer Part" %} | ||||
|                     </button> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user